diff --git a/packages/core/application/application-common.ts b/packages/core/application/application-common.ts index c7cbc0385..d27dee9c5 100644 --- a/packages/core/application/application-common.ts +++ b/packages/core/application/application-common.ts @@ -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; diff --git a/packages/core/application/index.d.ts b/packages/core/application/index.d.ts index 217efbecf..9d0106c3a 100644 --- a/packages/core/application/index.d.ts +++ b/packages/core/application/index.d.ts @@ -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