Fix menu icons for dark theme

This commit is contained in:
Jordan Wages 2025-07-08 01:46:54 -05:00
commit 179c81a156
2 changed files with 15 additions and 1 deletions

View file

@ -377,6 +377,19 @@ async function clearCacheForMessages(idsInput) {
refreshMenuIcons();
}
});
if (browser.theme?.onUpdated) {
browser.theme.onUpdated.addListener(async () => {
if (userTheme === 'auto') {
const theme = await detectSystemTheme();
if (theme !== currentTheme) {
currentTheme = theme;
updateActionIcon();
refreshMenuIcons();
}
}
});
}
} catch (err) {
logger.aiLog("failed to load config", { level: 'error' }, err);
}

View file

@ -41,6 +41,7 @@
"accountsRead",
"menus",
"scripting",
"tabs"
"tabs",
"theme"
]
}