avoid triggering forceupdate on homepage on init of theme state

This commit is contained in:
lukas 2021-09-26 23:58:56 +02:00
parent b685b7d7be
commit 63e4faf73d

View File

@ -25,12 +25,14 @@ class StaticInfos {
* @param enable enable the dark theme?
*/
enableDarkTheme(enable = true): void {
this.darktheme = enable;
if (this.darktheme !== enable) {
this.darktheme = enable;
// trigger onThemeChange handlers
this.handlers.map((func) => {
func();
});
// trigger onThemeChange handlers
this.handlers.map((func) => {
func();
});
}
}
/**