fix: dark mode toggling

This commit is contained in:
Aman Harwara
2022-10-06 18:53:27 +05:30
parent f9ee197f04
commit 1377846f3f
3 changed files with 11 additions and 8 deletions

View File

@@ -233,7 +233,6 @@ export class ThemeManager extends AbstractService {
if (theme && !theme.active) {
this.application.mutator.toggleTheme(theme).catch(console.error)
}
void this.application.setPreference(PrefKey.DarkMode, false)
}
}
@@ -324,6 +323,8 @@ export class ThemeManager extends AbstractService {
}
}
document.getElementsByTagName('head')[0].appendChild(link)
void this.application.setPreference(PrefKey.DarkMode, false)
}
private getBackgroundColor() {