From 98a35a42caced58e40b808abddfbe3d545b4d108 Mon Sep 17 00:00:00 2001
From: thororen <78185467+thororen1234@users.noreply.github.com>
Date: Tue, 3 Dec 2024 04:02:03 -0500
Subject: [PATCH 1/3] If AutoUpdate Only Relaunch as well
---
src/Vencord.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Vencord.ts b/src/Vencord.ts
index eee92344..62e1cade 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -108,7 +108,7 @@ async function init() {
noPersist: true,
onClick: relaunch
}), 10_000);
- return;
+ return relaunch;
}
setTimeout(() => showNotification({
From c83152630ff919a57b8c530faae9cb2b14d8a7e5 Mon Sep 17 00:00:00 2001
From: thororen <78185467+thororen1234@users.noreply.github.com>
Date: Tue, 3 Dec 2024 04:04:13 -0500
Subject: [PATCH 2/3] Auto Update Relaunch Setting
---
src/Vencord.ts | 3 ++-
src/api/Settings.ts | 4 +++-
src/components/VencordSettings/UpdaterTab.tsx | 10 +++++++++-
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/Vencord.ts b/src/Vencord.ts
index 62e1cade..af57ca3b 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -108,7 +108,8 @@ async function init() {
noPersist: true,
onClick: relaunch
}), 10_000);
- return relaunch;
+ if (Settings.autoUpdateRelaunch) return relaunch;
+ return;
}
setTimeout(() => showNotification({
diff --git a/src/api/Settings.ts b/src/api/Settings.ts
index 403d44d4..36cef22f 100644
--- a/src/api/Settings.ts
+++ b/src/api/Settings.ts
@@ -30,7 +30,8 @@ import plugins from "~plugins";
const logger = new Logger("Settings");
export interface Settings {
autoUpdate: boolean;
- autoUpdateNotification: boolean,
+ autoUpdateRelaunch: boolean;
+ autoUpdateNotification: boolean;
useQuickCss: boolean;
enableReactDevtools: boolean;
themeLinks: string[];
@@ -87,6 +88,7 @@ export interface Settings {
const DefaultSettings: Settings = {
autoUpdate: true,
+ autoUpdateRelaunch: false,
autoUpdateNotification: true,
useQuickCss: true,
themeLinks: [],
diff --git a/src/components/VencordSettings/UpdaterTab.tsx b/src/components/VencordSettings/UpdaterTab.tsx
index 7558b728..627d18f6 100644
--- a/src/components/VencordSettings/UpdaterTab.tsx
+++ b/src/components/VencordSettings/UpdaterTab.tsx
@@ -189,7 +189,7 @@ function Newer(props: CommonProps) {
}
function Updater() {
- const settings = useSettings(["autoUpdate", "autoUpdateNotification"]);
+ const settings = useSettings(["autoUpdate", "autoUpdateRelaunch", "autoUpdateNotification"]);
const [repo, err, repoPending] = useAwaiter(getRepo, { fallbackValue: "Loading..." });
@@ -221,6 +221,14 @@ function Updater() {
>
Get notified when an automatic update completes
+ settings.autoUpdateRelaunch = v}
+ note="When automatically updating relaunch as well"
+ disabled={!settings.autoUpdate}
+ >
+ Get notified when an automatic update completes
+
Repo
From f82a04974abec33b007a4083bb04b4568b0df87f Mon Sep 17 00:00:00 2001
From: thororen <78185467+thororen1234@users.noreply.github.com>
Date: Tue, 3 Dec 2024 04:05:43 -0500
Subject: [PATCH 3/3] Fix Text
---
src/components/VencordSettings/UpdaterTab.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/VencordSettings/UpdaterTab.tsx b/src/components/VencordSettings/UpdaterTab.tsx
index 627d18f6..fbae59d7 100644
--- a/src/components/VencordSettings/UpdaterTab.tsx
+++ b/src/components/VencordSettings/UpdaterTab.tsx
@@ -224,10 +224,10 @@ function Updater() {
settings.autoUpdateRelaunch = v}
- note="When automatically updating relaunch as well"
+ note="Relaunch's the app after automatically updating with no prompt"
disabled={!settings.autoUpdate}
>
- Get notified when an automatic update completes
+ When automatically updating relaunch as well without a prompt
Repo