fix(ios-frame): do not update backstack when navigating the same page (#5426)

This commit is contained in:
Alexander Djenkov
2018-02-19 11:53:04 +02:00
committed by GitHub
parent b8e0beccdd
commit 714af6bb02
2 changed files with 9 additions and 2 deletions

View File

@ -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);
@ -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();

View File

@ -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.