mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
fix(ios-frame): do not update backstack when navigating the same page (#5426)
This commit is contained in:

committed by
GitHub

parent
b8e0beccdd
commit
714af6bb02
@ -37,6 +37,14 @@ export class Frame extends FrameBase {
|
|||||||
return this._ios;
|
return this._ios;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setCurrent(entry: BackstackEntry, isBack: boolean): void {
|
||||||
|
if (entry !== this._currentEntry) {
|
||||||
|
this._updateBackstack(entry, isBack);
|
||||||
|
}
|
||||||
|
|
||||||
|
super.setCurrent(entry, isBack);
|
||||||
|
}
|
||||||
|
|
||||||
@profile
|
@profile
|
||||||
public _navigateCore(backstackEntry: BackstackEntry) {
|
public _navigateCore(backstackEntry: BackstackEntry) {
|
||||||
super._navigateCore(backstackEntry);
|
super._navigateCore(backstackEntry);
|
||||||
@ -352,7 +360,7 @@ class UINavigationControllerImpl extends UINavigationController {
|
|||||||
|
|
||||||
@profile
|
@profile
|
||||||
public viewDidDisappear(animated: boolean): void {
|
public viewDidDisappear(animated: boolean): void {
|
||||||
super.viewDidDisappear(animated);
|
super.viewDidDisappear(animated);
|
||||||
const owner = this._owner.get();
|
const owner = this._owner.get();
|
||||||
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
|
if (owner && owner.isLoaded && !owner.parent && !this.presentedViewController) {
|
||||||
owner.callUnloaded();
|
owner.callUnloaded();
|
||||||
|
@ -138,7 +138,6 @@ class UIViewControllerImpl extends UIViewController {
|
|||||||
isBack = isBackNavigationTo(owner, newEntry);
|
isBack = isBackNavigationTo(owner, newEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
frame._updateBackstack(newEntry, isBack);
|
|
||||||
frame.setCurrent(newEntry, isBack);
|
frame.setCurrent(newEntry, isBack);
|
||||||
|
|
||||||
// If page was shown with custom animation - we need to set the navigationController.delegate to the animatedDelegate.
|
// If page was shown with custom animation - we need to set the navigationController.delegate to the animatedDelegate.
|
||||||
|
Reference in New Issue
Block a user