From a014cf55b91551cb2bda7ac2280311c2b3bf3cbc Mon Sep 17 00:00:00 2001 From: Oleh Polisan Date: Sun, 18 Aug 2024 12:08:47 +0300 Subject: [PATCH] fix exploded tests --- src/main/firstLaunch.ts | 8 +++++++- src/main/mainWindow.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/firstLaunch.ts b/src/main/firstLaunch.ts index 4128097d..e1017058 100644 --- a/src/main/firstLaunch.ts +++ b/src/main/firstLaunch.ts @@ -47,7 +47,13 @@ export function createFirstLaunchTour() { console.log(data); State.store.firstLaunch = false; Settings.store.tray = true; - Settings.store.trayColor = getAccentColor()?.slice(1); + getAccentColor().then(color => { + if (color) { + Settings.store.trayColor = color.slice(1); + } else { + Settings.store.trayColor = "F6BFAC"; + } + }); Settings.store.minimizeToTray = !!data.minimizeToTray; Settings.store.arRPC = !!data.richPresence; diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 92e70e4d..9dee99d7 100755 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -506,7 +506,7 @@ export async function createWindows() { initArRPC(); } -export function getAccentColor() { +export function getAccentColor(): Promise { if (process.platform === "linux") { return new Promise((resolve, reject) => { const sessionBus = dbus.sessionBus();