fix: need to be a function to work

This commit is contained in:
Martin Guillon
2020-09-08 14:43:54 +02:00
parent eee862650d
commit 43f1d50a36
2 changed files with 11 additions and 0 deletions

View File

@ -149,6 +149,11 @@ export function orientationChanged(rootView: View, newOrientation: 'portrait' |
});
}
export let autoSystemAppearanceChanged = true;
export function setAutoSystemAppearanceChanged(value: boolean) {
autoSystemAppearanceChanged = value;
}
export function systemAppearanceChanged(rootView: View, newSystemAppearance: 'dark' | 'light'): void {
if (!rootView || !autoSystemAppearanceChanged) {
return;

View File

@ -58,6 +58,12 @@ export const systemAppearanceChangedEvent: string;
* Boolean to enable/disable systemAppearanceChanged
*/
export let autoSystemAppearanceChanged = true;
/**
* enable/disable systemAppearanceChanged
*/
export function setAutoSystemAppearanceChanged (value: boolean);
/**
* Updates root view classes including those of modals
* @param rootView the root view