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

Fixes multiple android navigation chashes by hshristov · Pull Request #5173 · NativeScript/NativeScript · GitHub

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

Filter by extension

Filter by extension .ts  (10) 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
2 changes: 1 addition & 1 deletion tests/app/ui/page/page-tests.android.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 @@ -105,6 +105,6 @@ export var test_Resolve_Fragment_ForPage = function () {
frame.navigate(pageFactory);
TKUnit.waitUntilReady(() => frame.navigationQueueIsEmpty());

const fragment = frame.android.fragmentForPage(testPage);
const fragment = frame.android.fragmentForPage(frame._currentEntry);
TKUnit.assertNotNull(fragment, "Failed to resolve native fragment for page");
}
13 changes: 13 additions & 0 deletions tns-core-modules/application/application.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 @@ -154,17 +154,30 @@ class IOSApplication implements IOSApplicationDefinition {
let ios = utils.ios.getter(UIApplication, UIApplication.sharedApplication);
let object = this;
notify(<ApplicationEventData>{ eventName: resumeEvent, object, ios });
const content = this._window.content;
if (content && !content.isLoaded) {
content.onLoaded();
}

if (!displayedOnce) {
notify(<ApplicationEventData>{ eventName: displayedEvent, object, ios });
displayedOnce = true;
}
}

private didEnterBackground(notification: NSNotification) {
const content = this._window.content;
if (content && content.isLoaded) {
content.onUnloaded();
}
notify(<ApplicationEventData>{ eventName: suspendEvent, object: this, ios: utils.ios.getter(UIApplication, UIApplication.sharedApplication) });
}

private willTerminate(notification: NSNotification) {
const content = this._window.content;
if (content && content.isLoaded) {
content.onUnloaded();
}
notify(<ApplicationEventData>{ eventName: exitEvent, object: this, ios: utils.ios.getter(UIApplication, UIApplication.sharedApplication) });
}

Expand Down
4 changes: 4 additions & 0 deletions tns-core-modules/ui/frame/fragment.android.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 @@ -19,6 +19,10 @@ class FragmentClass extends android.app.Fragment {
return result;
}

public onStop(): void {
this._callbacks.onStop(this, super.onStop);
}

public onCreate(savedInstanceState: android.os.Bundle) {
if (!this._callbacks) {
setFragmentCallbacks(this);
Expand Down
Loading

Back | FazBrowse Home | New Git URL