fix(core): update

This commit is contained in:
Philipp Kunz 2020-11-24 19:23:06 +00:00
parent f4029ed008
commit 47099d02b5

View File

@ -21,15 +21,24 @@ export class ThemeManager {
}
}
public goBright() {
private async updateAllConnectedElements() {
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
await this.setThemeStatusForElement(elementArg, true);
await this.setThemeStatusForElement(elementArg, this.goBrightBoolean);
});
}
public goBright() {
this.goBrightBoolean = true;
this.updateAllConnectedElements();
}
public goDark() {
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
await this.setThemeStatusForElement(elementArg, false);
});
this.goBrightBoolean = false;
this.updateAllConnectedElements();
}
public toggleDarkBright() {
this.goBrightBoolean = !this.goBrightBoolean;
this.updateAllConnectedElements();
}
}