From 5fa4ae982410c882ac1bc3fe07318731a5abf1b1 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 4 Jul 2024 19:30:03 +0200 Subject: [PATCH] fix first launch switches --- src/main/firstLaunch.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/firstLaunch.ts b/src/main/firstLaunch.ts index d1bbceb..dee4882 100644 --- a/src/main/firstLaunch.ts +++ b/src/main/firstLaunch.ts @@ -18,11 +18,11 @@ import { Settings, State } from "./settings"; import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally"; interface Data { - minimizeToTray: boolean; discordBranch: "stable" | "canary" | "ptb"; - autoStart: boolean; - importSettings: boolean; - richPresence: boolean; + minimizeToTray?: "on"; + autoStart?: "on"; + importSettings?: "on"; + richPresence?: "on"; } export function createFirstLaunchTour() { @@ -44,10 +44,11 @@ export function createFirstLaunchTour() { if (!msg.startsWith("form:")) return; const data = JSON.parse(msg.slice(5)) as Data; + console.log(data); State.store.firstLaunch = false; - Settings.store.minimizeToTray = data.minimizeToTray; Settings.store.discordBranch = data.discordBranch; - Settings.store.arRPC = data.richPresence; + Settings.store.minimizeToTray = !!data.minimizeToTray; + Settings.store.arRPC = !!data.richPresence; if (data.autoStart) autoStart.enable();