From 6b26c12bfa1f28d40834478b50d2f7b09c9f54fb Mon Sep 17 00:00:00 2001 From: V Date: Tue, 4 Apr 2023 01:16:29 +0200 Subject: Add additional build flavours for Vencord Desktop (#765) --- src/components/VencordSettings/Updater.tsx | 3 ++- src/components/VencordSettings/VencordTab.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/components/VencordSettings') diff --git a/src/components/VencordSettings/Updater.tsx b/src/components/VencordSettings/Updater.tsx index 3c3eb91..15a8c87 100644 --- a/src/components/VencordSettings/Updater.tsx +++ b/src/components/VencordSettings/Updater.tsx @@ -24,6 +24,7 @@ import { handleComponentFailed } from "@components/handleComponentFailed"; import { Link } from "@components/Link"; import { Margins } from "@utils/margins"; import { classes, useAwaiter } from "@utils/misc"; +import { relaunch } from "@utils/native"; import { changes, checkForUpdates, getRepo, isNewer, rebuild, update, updateError, UpdateLogger } from "@utils/updater"; import { Alerts, Button, Card, Forms, Parser, React, Switch, Toasts } from "@webpack/common"; @@ -133,7 +134,7 @@ function Updatable(props: CommonProps) { cancelText: "Not now!", onConfirm() { if (needFullRestart) - window.DiscordNative.app.relaunch(); + relaunch(); else location.reload(); r(); diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx index 7113421..8b86968 100644 --- a/src/components/VencordSettings/VencordTab.tsx +++ b/src/components/VencordSettings/VencordTab.tsx @@ -26,6 +26,7 @@ import { ErrorCard } from "@components/ErrorCard"; import IpcEvents from "@utils/IpcEvents"; import { Margins } from "@utils/margins"; import { identity, useAwaiter } from "@utils/misc"; +import { relaunch } from "@utils/native"; import { Button, Card, Forms, React, Select, Slider, Switch } from "@webpack/common"; const cl = classNameFactory("vc-settings-"); @@ -100,7 +101,7 @@ function VencordSettings() { ) : ( @@ -111,6 +112,7 @@ function VencordSettings() { Open QuickCSS File