Skip to content

Commit b3721cc

Browse files
author
Hristo Hristov
committed
Merge pull request #1637 from NativeScript/atanasovg/fix-navigation-clearhistory
Fixes breaking app on back btn clearHistory: true on android
2 parents 32080e8 + cbbde1b commit b3721cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ui/frame/frame.android.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export class Frame extends frameCommon.Frame {
238238
}
239239

240240
let manager = activity.getFragmentManager();
241+
let isFirstNavigation = types.isNullOrUndefined(this._currentEntry);
241242

242243
// Clear history
243244
if (backstackEntry.entry.clearHistory) {
@@ -307,7 +308,6 @@ export class Frame extends frameCommon.Frame {
307308
// remember the fragment tag at page level so that we can retrieve the fragment associated with a Page instance
308309
backstackEntry.resolvedPage[TAG] = newFragmentTag;
309310

310-
let isFirstNavigation = types.isNullOrUndefined(this._currentEntry);
311311
if (isFirstNavigation) {
312312
fragmentTransaction.add(this.containerViewId, newFragment, newFragmentTag);
313313
trace.write(`fragmentTransaction.add(${newFragmentTag});`, trace.categories.NativeLifecycle);

0 commit comments

Comments
 (0)