improve theme selection + bug fixes

This commit is contained in:
SethBurkart123
2024-05-29 08:01:44 +10:00
parent 4e5a912cbb
commit 026033ad57
7 changed files with 64 additions and 26 deletions
+3 -3
View File
@@ -5,9 +5,9 @@ import { applyTheme } from './applyTheme';
export const enableCurrentTheme = async () => {
const themeId = await browser.storage.local.get('selectedTheme') as { selectedTheme: string; };
if (themeId.selectedTheme) {
const theme = await localforage.getItem(themeId.selectedTheme) as CustomTheme;
const { selectedTheme } = await browser.storage.local.get('selectedTheme') as { selectedTheme: string; };
if (selectedTheme) {
const theme = await localforage.getItem(selectedTheme) as CustomTheme;
if (theme) {
await applyTheme(theme);
}