Skip to content

Commit

Permalink
fix(ios-frame): do not update backstack when navigating the same page (
Browse files Browse the repository at this point in the history
  • Loading branch information
ADjenkov committed Feb 19, 2018
1 parent b8e0bec commit 714af6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion tns-core-modules/ui/frame/frame.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ export class Frame extends FrameBase {
return this._ios;
}

public setCurrent(entry: BackstackEntry, isBack: boolean): void {
if (entry !== this._currentEntry) {
this._updateBackstack(entry, isBack);
}

super.setCurrent(entry, isBack);
}

@profile
public _navigateCore(backstackEntry: BackstackEntry) {
super._navigateCore(backstackEntry);
Expand Down Expand Up @@ -352,7 +360,7 @@ class UINavigationControllerImpl extends UINavigationController {

@profile
public viewDidDisappear(animated: boolean): void {
super.viewDidDisappear(animated);
super.viewDidDisappear(animated);
const owner = this._owner.get();
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
owner.callUnloaded();
Expand Down
1 change: 0 additions & 1 deletion tns-core-modules/ui/page/page.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class UIViewControllerImpl extends UIViewController {
isBack = isBackNavigationTo(owner, newEntry);
}

frame._updateBackstack(newEntry, isBack);
frame.setCurrent(newEntry, isBack);

// If page was shown with custom animation - we need to set the navigationController.delegate to the animatedDelegate.
Expand Down

0 comments on commit 714af6b

Please sign in to comment.