Fix menu icons for dark theme
This commit is contained in:
parent
0041f339e3
commit
179c81a156
2 changed files with 15 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue