mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 19:37:01 -04:00
Improvements for VencordDesktop (#847)
This commit is contained in:
parent
bfa20f2634
commit
08822dd190
13 changed files with 85 additions and 147 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue