From d45dea84710896d53f83e092262f349afa9adc03 Mon Sep 17 00:00:00 2001 From: Eduardo Speroni Date: Mon, 26 Jul 2021 18:52:19 -0300 Subject: [PATCH 1/2] fix(android): allow 0-length properties (#9485) --- packages/core/ui/core/view/index.android.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/ui/core/view/index.android.ts b/packages/core/ui/core/view/index.android.ts index a9bbbab5c..0d7150acc 100644 --- a/packages/core/ui/core/view/index.android.ts +++ b/packages/core/ui/core/view/index.android.ts @@ -1214,7 +1214,7 @@ function createNativePercentLengthProperty(options: NativePercentLengthPropertyO setPercent = options.setPercent || percentNotSupported; options = null; } - if (length == 'auto' || !length) { + if (length == 'auto' || length == null) { // tslint:disable-line setPixels(this.nativeViewProtected, auto); } else if (typeof length === 'number') { From d0f00e24d8a1b5019e51316e7a3a858ff1835075 Mon Sep 17 00:00:00 2001 From: Eduardo Speroni Date: Wed, 28 Jul 2021 17:13:45 -0300 Subject: [PATCH 2/2] fix(core): correctly export setAutoSystemAppearanceChanged (#9489) --- packages/core/index.d.ts | 3 ++- packages/core/index.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts index 06ee8b097..ffd3b5a7d 100644 --- a/packages/core/index.d.ts +++ b/packages/core/index.d.ts @@ -8,7 +8,7 @@ export type { NativeScriptConfig } from './config'; export { iOSApplication, AndroidApplication } from './application'; export type { ApplicationEventData, LaunchEventData, OrientationChangedEventData, UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData, AndroidActivityEventData, AndroidActivityBundleEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, AndroidActivityNewIntentEventData, AndroidActivityBackPressedEventData, SystemAppearanceChangedEventData } from './application'; -import { systemAppearanceChanged, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, systemAppearance } from './application'; +import { systemAppearanceChanged, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, systemAppearance, setAutoSystemAppearanceChanged } from './application'; export declare const Application: { launchEvent: string; displayedEvent: string; @@ -40,6 +40,7 @@ export declare const Application: { getNativeApplication: typeof getNativeApplication; hasLaunched: typeof hasLaunched; systemAppearance: typeof systemAppearance; + setAutoSystemAppearanceChanged: typeof setAutoSystemAppearanceChanged; android: import('./application').AndroidApplication; ios: import('./application').iOSApplication; }; diff --git a/packages/core/index.ts b/packages/core/index.ts index 735f7c266..32aae19fe 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -5,7 +5,7 @@ import './globals'; export { iOSApplication, AndroidApplication } from './application'; export type { ApplicationEventData, LaunchEventData, OrientationChangedEventData, UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData, AndroidActivityEventData, AndroidActivityBundleEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, AndroidActivityNewIntentEventData, AndroidActivityBackPressedEventData, SystemAppearanceChangedEventData } from './application'; -import { fontScaleChangedEvent, launchEvent, displayedEvent, uncaughtErrorEvent, discardedErrorEvent, suspendEvent, resumeEvent, exitEvent, lowMemoryEvent, orientationChangedEvent, systemAppearanceChanged, systemAppearanceChangedEvent, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, android as appAndroid, ios as iosApp, systemAppearance } from './application'; +import { fontScaleChangedEvent, launchEvent, displayedEvent, uncaughtErrorEvent, discardedErrorEvent, suspendEvent, resumeEvent, exitEvent, lowMemoryEvent, orientationChangedEvent, systemAppearanceChanged, systemAppearanceChangedEvent, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, android as appAndroid, ios as iosApp, systemAppearance, setAutoSystemAppearanceChanged } from './application'; export const Application = { launchEvent, displayedEvent, @@ -38,6 +38,7 @@ export const Application = { getNativeApplication, hasLaunched, systemAppearance, + setAutoSystemAppearanceChanged, android: appAndroid, ios: iosApp,