diff --git a/src/Vencord.ts b/src/Vencord.ts index eee92344..af57ca3b 100644 --- a/src/Vencord.ts +++ b/src/Vencord.ts @@ -108,6 +108,7 @@ async function init() { noPersist: true, onClick: relaunch }), 10_000); + if (Settings.autoUpdateRelaunch) return relaunch; return; } 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..fbae59d7 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="Relaunch's the app after automatically updating with no prompt" + disabled={!settings.autoUpdate} + > + When automatically updating relaunch as well without a prompt + Repo