avoid triggering forceupdate on homepage on init of theme state
This commit is contained in:
parent
b685b7d7be
commit
63e4faf73d
@ -25,12 +25,14 @@ class StaticInfos {
|
|||||||
* @param enable enable the dark theme?
|
* @param enable enable the dark theme?
|
||||||
*/
|
*/
|
||||||
enableDarkTheme(enable = true): void {
|
enableDarkTheme(enable = true): void {
|
||||||
this.darktheme = enable;
|
if (this.darktheme !== enable) {
|
||||||
|
this.darktheme = enable;
|
||||||
|
|
||||||
// trigger onThemeChange handlers
|
// trigger onThemeChange handlers
|
||||||
this.handlers.map((func) => {
|
this.handlers.map((func) => {
|
||||||
func();
|
func();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user