feat(core): boolean to disable systemAppearanceChanged (theme) (#8827)

This commit is contained in:
Martin Guillon
2020-09-09 08:16:42 +02:00
committed by GitHub
parent 354b935c6a
commit 5286adf081
2 changed files with 16 additions and 1 deletions

View File

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