disable selector when forcing custom theme

This commit is contained in:
Mononaut committed 2024-05-07 23:48:28 +00:00
1 parent 4c697d0008
commit 788a95b260
2 files changed
+14 -8

No files matched your search

+4 -2
View File
@@ -17,7 +17,7 @@ export class ThemeService {
private storageService: StorageService,
private stateService: StateService,
) {
const theme = this.storageService.getValue('theme-preference') || this.stateService.env.customize?.theme || 'default';
const theme = this.stateService.env.customize?.theme || this.storageService.getValue('theme-preference') || 'default';
this.apply(theme);
}
@@ -44,7 +44,9 @@ export class ThemeService {
this.style = null;
}
}
this.storageService.setValue('theme-preference', theme);
if (!this.stateService.env.customize?.theme) {
this.storageService.setValue('theme-preference', theme);
}
this.themeChanged$.next(this.theme);
}
}