fix first launch switches
This commit is contained in:
parent
281885a87e
commit
5fa4ae9824
1 changed files with 7 additions and 6 deletions
|
@ -18,11 +18,11 @@ import { Settings, State } from "./settings";
|
||||||
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
|
||||||
|
|
||||||
interface Data {
|
interface Data {
|
||||||
minimizeToTray: boolean;
|
|
||||||
discordBranch: "stable" | "canary" | "ptb";
|
discordBranch: "stable" | "canary" | "ptb";
|
||||||
autoStart: boolean;
|
minimizeToTray?: "on";
|
||||||
importSettings: boolean;
|
autoStart?: "on";
|
||||||
richPresence: boolean;
|
importSettings?: "on";
|
||||||
|
richPresence?: "on";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createFirstLaunchTour() {
|
export function createFirstLaunchTour() {
|
||||||
|
@ -44,10 +44,11 @@ export function createFirstLaunchTour() {
|
||||||
if (!msg.startsWith("form:")) return;
|
if (!msg.startsWith("form:")) return;
|
||||||
const data = JSON.parse(msg.slice(5)) as Data;
|
const data = JSON.parse(msg.slice(5)) as Data;
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
State.store.firstLaunch = false;
|
State.store.firstLaunch = false;
|
||||||
Settings.store.minimizeToTray = data.minimizeToTray;
|
|
||||||
Settings.store.discordBranch = data.discordBranch;
|
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();
|
if (data.autoStart) autoStart.enable();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue