feat: boolean to disable systemAppearanceChanged (theme)

This commit is contained in:
Martin Guillon
2020-09-08 14:22:22 +02:00
parent f6e1ab709f
commit b8df0b3ac0
2 changed files with 6 additions and 2 deletions

View File

@ -148,9 +148,9 @@ export function orientationChanged(rootView: View, newOrientation: 'portrait' |
applyCssClass(rootModalView, ORIENTATION_CSS_CLASSES, newOrientationCssClass);
});
}
export let autoSystemAppearanceChanged = true;
export function systemAppearanceChanged(rootView: View, newSystemAppearance: 'dark' | 'light'): void {
if (!rootView) {
if (!rootView || !autoSystemAppearanceChanged) {
return;
}

View File

@ -54,6 +54,10 @@ export const orientationChangedEvent: string;
*/
export const systemAppearanceChangedEvent: string;
/**
* Boolean to enable/disable systemAppearanceChanged
*/
export let autoSystemAppearanceChanged = true;
/**
* Updates root view classes including those of modals
* @param rootView the root view