theme fix

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-11-01 14:13:37 +01:00
parent 2ad918cf99
commit 2f84d8e01d
+9 -6
View File
@@ -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)