disable selector when forcing custom theme

This commit is contained in:
Mononaut
2024-05-07 23:31:51 +00:00
parent 4c697d0008
commit 788a95b260
2 changed files with 14 additions and 8 deletions

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);
}
}