From 54b6df669b050b5ad5503f370f50a44a9af501af Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Mon, 17 Dec 2018 15:27:52 +0200 Subject: [PATCH 1/5] fix(android): animator restore logic on simulated nav (#6710) --- tns-core-modules/ui/frame/frame.android.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 1f56a8eb2..0322aaf3c 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -527,10 +527,22 @@ function getAnimatorState(entry: BackstackEntry): AnimatorState { function restoreAnimatorState(entry: BackstackEntry, snapshot: AnimatorState): void { const expandedEntry = entry; - expandedEntry.enterAnimator = snapshot.enterAnimator; - expandedEntry.exitAnimator = snapshot.exitAnimator; - expandedEntry.popEnterAnimator = snapshot.popEnterAnimator; - expandedEntry.popExitAnimator = snapshot.popExitAnimator; + if (snapshot.enterAnimator) { + expandedEntry.enterAnimator = snapshot.enterAnimator; + } + + if (snapshot.exitAnimator) { + expandedEntry.exitAnimator = snapshot.exitAnimator; + } + + if (snapshot.popEnterAnimator) { + expandedEntry.popEnterAnimator = snapshot.popEnterAnimator; + } + + if (snapshot.popExitAnimator) { + expandedEntry.popExitAnimator = snapshot.popExitAnimator; + } + expandedEntry.transitionName = snapshot.transitionName; } From e5f110fe5c781689401533bbafe0d37374d7c100 Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Tue, 18 Dec 2018 10:23:02 +0200 Subject: [PATCH 2/5] fix(android): failure saving state in mixed parent/nested frame nav (#6719) --- tns-core-modules/ui/frame/frame.android.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 0322aaf3c..71e39e4b7 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -903,6 +903,12 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks { return null; } + // [nested frames / fragments] see https://github.com/NativeScript/NativeScript/issues/6629 + // retaining reference to a destroyed fragment here somehow causes a cryptic + // "IllegalStateException: Failure saving state: active fragment has cleared index: -1" + // in a specific mixed parent / nested frame navigation scenario + entry.fragment = null; + const page = entry.resolvedPage; if (!page) { traceError(`${fragment}.onDestroy: entry has no resolvedPage`); From ee2c1c42d4131c3dd909f87fd087f8abf9a7ac6d Mon Sep 17 00:00:00 2001 From: Darin Dimitrov Date: Tue, 18 Dec 2018 14:23:27 +0200 Subject: [PATCH 3/5] Fix some lint errors --- apps/app/css-perf-test/main-page.ts | 2 +- apps/app/cuteness.io/main-page.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/app/css-perf-test/main-page.ts b/apps/app/css-perf-test/main-page.ts index c22a93868..eccc8d67c 100644 --- a/apps/app/css-perf-test/main-page.ts +++ b/apps/app/css-perf-test/main-page.ts @@ -1,4 +1,4 @@ -import {EventData as ObservableEventData } from "tns-core-modules/data/observable"; +import { EventData as ObservableEventData } from "tns-core-modules/data/observable"; export function navigatedTo(args: ObservableEventData) { setTimeout(() => { diff --git a/apps/app/cuteness.io/main-page.ts b/apps/app/cuteness.io/main-page.ts index 6fc3b9429..b2a89b2c3 100644 --- a/apps/app/cuteness.io/main-page.ts +++ b/apps/app/cuteness.io/main-page.ts @@ -1,7 +1,7 @@ -import {EventData as ObservableEventData } from "tns-core-modules/data/observable"; +import { EventData as ObservableEventData } from "tns-core-modules/data/observable"; import { Page } from "tns-core-modules/ui/page"; -import {ItemEventData as ListViewItemEventData } from "tns-core-modules/ui/list-view"; -import {topmost as topmostFrame } from "tns-core-modules/ui/frame"; +import { ItemEventData as ListViewItemEventData } from "tns-core-modules/ui/list-view"; +import { topmost as topmostFrame } from "tns-core-modules/ui/frame"; import { AppViewModel } from "./reddit-app-view-model"; var appViewModel = new AppViewModel(); From 1783747014c6c15566dfce41dffbd1334e6660a8 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Wed, 19 Dec 2018 14:01:37 +0200 Subject: [PATCH 4/5] release: cut the 5.1.1 release --- CHANGELOG.md | 18 ++++++++++++++++++ tns-core-modules/package.json | 10 +++++----- tns-platform-declarations/package.json | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a3ad5f42..48871fdee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ + +## [5.1.1](https://github.com/NativeScript/NativeScript/compare/5.1.0...5.1.1) (2018-12-19) + + +### Bug Fixes + +* **android:** animator restore logic on simulated nav ([#6710](https://github.com/NativeScript/NativeScript/issues/6710)) ([54b6df6](https://github.com/NativeScript/NativeScript/commit/54b6df6)) +* **android:** failure saving state in mixed parent/nested frame nav ([#6719](https://github.com/NativeScript/NativeScript/issues/6719)) ([e5f110f](https://github.com/NativeScript/NativeScript/commit/e5f110f)) +* **android:** nested fragment disappears on parent fragment removal ([#6677](https://github.com/NativeScript/NativeScript/issues/6677)) ([c084660](https://github.com/NativeScript/NativeScript/commit/c084660)) + + +### Features + +* **tns-platform-declarations:** Generate iOS typings from iOS 12.1 SDK ([#6693](https://github.com/NativeScript/NativeScript/issues/6693)) ([1c0218e](https://github.com/NativeScript/NativeScript/commit/1c0218e)) +* **view:** added iOS parameter for modal presentation style ([#6409](https://github.com/NativeScript/NativeScript/issues/6409)) ([540b2b4](https://github.com/NativeScript/NativeScript/commit/540b2b4)) + + + # [5.1.0](https://github.com/NativeScript/NativeScript/compare/5.0.5...5.1.0) (2018-12-05) diff --git a/tns-core-modules/package.json b/tns-core-modules/package.json index 17a3e7421..201c94c65 100644 --- a/tns-core-modules/package.json +++ b/tns-core-modules/package.json @@ -1,7 +1,7 @@ { "name": "tns-core-modules", "description": "Telerik NativeScript Core Modules", - "version": "5.2.0", + "version": "5.1.1", "homepage": "https://www.nativescript.org", "repository": { "type": "git", @@ -26,7 +26,7 @@ "license": "Apache-2.0", "typings": "tns-core-modules.d.ts", "dependencies": { - "tns-core-modules-widgets": "next", + "tns-core-modules-widgets": "5.1.1", "tslib": "^1.9.3" }, "devDependencies": { @@ -38,8 +38,8 @@ }, "nativescript": { "platforms": { - "ios": "4.0.0", - "android": "4.0.0" + "ios": "5.0.0", + "android": "5.0.0" } }, "snapshot": { @@ -52,4 +52,4 @@ } } } -} +} \ No newline at end of file diff --git a/tns-platform-declarations/package.json b/tns-platform-declarations/package.json index b3d093a34..826c973d7 100644 --- a/tns-platform-declarations/package.json +++ b/tns-platform-declarations/package.json @@ -1,6 +1,6 @@ { "name": "tns-platform-declarations", - "version": "5.2.0", + "version": "5.1.1", "description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects", "main": "", "scripts": { From 718fb0c7b3e894363efc8a53364cbef191f8996b Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Wed, 19 Dec 2018 16:20:16 +0200 Subject: [PATCH 5/5] chore: bump widgets version to 5.1.2 --- tns-core-modules/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tns-core-modules/package.json b/tns-core-modules/package.json index 201c94c65..444817415 100644 --- a/tns-core-modules/package.json +++ b/tns-core-modules/package.json @@ -26,7 +26,7 @@ "license": "Apache-2.0", "typings": "tns-core-modules.d.ts", "dependencies": { - "tns-core-modules-widgets": "5.1.1", + "tns-core-modules-widgets": "5.1.2", "tslib": "^1.9.3" }, "devDependencies": {