FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(ios-frame): do not update backstack when navigating the same page by ADjenkov · Pull Request #5426 · NativeScript/NativeScript · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ts  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 9 additions & 1 deletion tns-core-modules/ui/frame/frame.ios.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL