mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Merge pull request #1637 from NativeScript/atanasovg/fix-navigation-clearhistory
Fixes breaking app on back btn clearHistory: true on android
This commit is contained in:
@ -238,6 +238,7 @@ export class Frame extends frameCommon.Frame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let manager = activity.getFragmentManager();
|
let manager = activity.getFragmentManager();
|
||||||
|
let isFirstNavigation = types.isNullOrUndefined(this._currentEntry);
|
||||||
|
|
||||||
// Clear history
|
// Clear history
|
||||||
if (backstackEntry.entry.clearHistory) {
|
if (backstackEntry.entry.clearHistory) {
|
||||||
@ -307,7 +308,6 @@ export class Frame extends frameCommon.Frame {
|
|||||||
// remember the fragment tag at page level so that we can retrieve the fragment associated with a Page instance
|
// remember the fragment tag at page level so that we can retrieve the fragment associated with a Page instance
|
||||||
backstackEntry.resolvedPage[TAG] = newFragmentTag;
|
backstackEntry.resolvedPage[TAG] = newFragmentTag;
|
||||||
|
|
||||||
let isFirstNavigation = types.isNullOrUndefined(this._currentEntry);
|
|
||||||
if (isFirstNavigation) {
|
if (isFirstNavigation) {
|
||||||
fragmentTransaction.add(this.containerViewId, newFragment, newFragmentTag);
|
fragmentTransaction.add(this.containerViewId, newFragment, newFragmentTag);
|
||||||
trace.write(`fragmentTransaction.add(${newFragmentTag});`, trace.categories.NativeLifecycle);
|
trace.write(`fragmentTransaction.add(${newFragmentTag});`, trace.categories.NativeLifecycle);
|
||||||
|
Reference in New Issue
Block a user