mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-28 12:35:40 +01:00
Only update to system theme if theme is Default
This commit is contained in:
parent
c225210a44
commit
7f5a5a5fbb
@ -124,9 +124,12 @@ export class AppComponent implements OnInit {
|
||||
window.onkeypress = () => this.recordActivity();
|
||||
});
|
||||
|
||||
this.platformUtilsService.onDefaultSystemThemeChange(theme => {
|
||||
window.document.documentElement.classList.remove('theme_light', 'theme_dark');
|
||||
window.document.documentElement.classList.add('theme_' + theme);
|
||||
this.platformUtilsService.onDefaultSystemThemeChange(async systemTheme => {
|
||||
const theme = await this.storageService.get<string>(ConstantsService.themeKey);
|
||||
if (theme == null) {
|
||||
window.document.documentElement.classList.remove('theme_light', 'theme_dark');
|
||||
window.document.documentElement.classList.add('theme_' + systemTheme);
|
||||
}
|
||||
});
|
||||
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user