From 2f84d8e01da34f5614794c418706e9387d05ed77 Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Sat, 1 Nov 2025 14:13:37 +0100 Subject: [PATCH] theme fix Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com> --- lib/tray.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/tray.ts b/lib/tray.ts index c45ed2d..9de20fc 100644 --- a/lib/tray.ts +++ b/lib/tray.ts @@ -29,11 +29,14 @@ async function resolveTrayIconForTheme() { const existingTheme = usePersistedStore.getState().themeV2 console.log('[resolveTrayIconForTheme] existingTheme', existingTheme) - // if ('tray' in existingTheme && existingTheme.tray) { - // return existingTheme.tray === 'dark' - // ? 'icons/favicon/icon.png' - // : 'icons/favicon/icon-light.png' - // } + if ('tray' in existingTheme && existingTheme.tray) { + const pickedPath = + existingTheme.tray === 'dark' + ? 'icons/favicon/icon.png' + : 'icons/favicon/icon-light.png' + + return await resolveResource(pickedPath) + } let theme: 'light' | 'dark' = 'dark' @@ -63,7 +66,7 @@ async function resolveTrayIconForTheme() { console.log('[resolveTrayIconForTheme] theme', theme) - // usePersistedStore.setState({ themeV2: { tray: theme } }) + usePersistedStore.setState({ themeV2: { tray: theme } }) const pickedPath = theme === 'dark' ? 'icons/favicon/icon.png' : 'icons/favicon/icon-light.png' console.log('[resolveTrayIconForTheme] pickedPath', pickedPath)