mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
fix: need to be a function to work
This commit is contained in:
@ -149,6 +149,11 @@ export function orientationChanged(rootView: View, newOrientation: 'portrait' |
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
export let autoSystemAppearanceChanged = true;
|
export let autoSystemAppearanceChanged = true;
|
||||||
|
|
||||||
|
export function setAutoSystemAppearanceChanged(value: boolean) {
|
||||||
|
autoSystemAppearanceChanged = value;
|
||||||
|
}
|
||||||
|
|
||||||
export function systemAppearanceChanged(rootView: View, newSystemAppearance: 'dark' | 'light'): void {
|
export function systemAppearanceChanged(rootView: View, newSystemAppearance: 'dark' | 'light'): void {
|
||||||
if (!rootView || !autoSystemAppearanceChanged) {
|
if (!rootView || !autoSystemAppearanceChanged) {
|
||||||
return;
|
return;
|
||||||
|
6
packages/core/application/index.d.ts
vendored
6
packages/core/application/index.d.ts
vendored
@ -58,6 +58,12 @@ export const systemAppearanceChangedEvent: string;
|
|||||||
* Boolean to enable/disable systemAppearanceChanged
|
* Boolean to enable/disable systemAppearanceChanged
|
||||||
*/
|
*/
|
||||||
export let autoSystemAppearanceChanged = true;
|
export let autoSystemAppearanceChanged = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enable/disable systemAppearanceChanged
|
||||||
|
*/
|
||||||
|
export function setAutoSystemAppearanceChanged (value: boolean);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates root view classes including those of modals
|
* Updates root view classes including those of modals
|
||||||
* @param rootView the root view
|
* @param rootView the root view
|
||||||
|
Reference in New Issue
Block a user