fix(ThemeManager): Refactor ThemeManager class to separate global style setting logic

This commit is contained in:
2024-10-21 17:25:08 +02:00
parent 33721f86ab
commit a20b321bb0
3 changed files with 10 additions and 2 deletions

View File

@ -21,10 +21,13 @@ export class ThemeManager {
this.updateAllConnectedElements();
}
private async updateAllConnectedElements() {
private async setGlobalStylesOnPurpose() {
if (document.body && document.body.style) {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
}
}
private async updateAllConnectedElements() {
this.themeObservable.next(this.goBrightBoolean);
}