aboutsummaryrefslogtreecommitdiff
path: root/src/Vencord.ts
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-04-09 04:04:02 +0200
committerGitHub <noreply@github.com>2023-04-09 04:04:02 +0200
commit08822dd19064ea5b707117c5ed51f62dd0a8e316 (patch)
tree1020c2dad28f5dc502f797ca09066145fcc12109 /src/Vencord.ts
parentbfa20f2634a0f3f73a03135f9ddb9d0dfe566e88 (diff)
downloadVencord-08822dd19064ea5b707117c5ed51f62dd0a8e316.tar.gz
Vencord-08822dd19064ea5b707117c5ed51f62dd0a8e316.tar.bz2
Vencord-08822dd19064ea5b707117c5ed51f62dd0a8e316.zip
Improvements for VencordDesktop (#847)
Diffstat (limited to 'src/Vencord.ts')
-rw-r--r--src/Vencord.ts17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/Vencord.ts b/src/Vencord.ts
index a23b1a8..f11ca16 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -27,12 +27,14 @@ export { PlainSettings, Settings };
import "./utils/quickCss";
import "./webpack/patchWebpack";
+import { relaunch } from "@utils/native";
+
import { showNotification } from "./api/Notifications";
import { PlainSettings, Settings } from "./api/settings";
import { patches, PMLogger, startAllPlugins } from "./plugins";
import { localStorage } from "./utils/localStorage";
import { getCloudSettings, putCloudSettings } from "./utils/settingsSync";
-import { checkForUpdates, rebuild, update, UpdateLogger } from "./utils/updater";
+import { checkForUpdates, rebuild, update,UpdateLogger } from "./utils/updater";
import { onceReady } from "./webpack";
import { SettingsRouter } from "./webpack/common";
@@ -75,23 +77,14 @@ async function init() {
if (Settings.autoUpdate) {
await update();
- const needsFullRestart = await rebuild();
+ await rebuild();
if (Settings.autoUpdateNotification)
setTimeout(() => showNotification({
title: "Vencord has been updated!",
body: "Click here to restart",
permanent: true,
noPersist: true,
- onClick() {
- if (needsFullRestart) {
- if (IS_DISCORD_DESKTOP)
- window.DiscordNative.app.relaunch();
- else
- window.VencordDesktop.app.relaunch();
- }
- else
- location.reload();
- }
+ onClick: relaunch
}), 10_000);
return;
}