mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge pull request #862 from NativeScript/backstack
Fixed the navigation tests.
This commit is contained in:
@@ -184,7 +184,6 @@ export class Frame extends view.CustomLayoutView implements definition.Frame {
|
||||
var entry = this._navigationQueue[0].entry;
|
||||
var currentNavigationPage = entry.resolvedPage;
|
||||
if (page !== currentNavigationPage) {
|
||||
console.trace();
|
||||
throw new Error(`Corrupted navigation stack; page: ${page.id}; currentNavigationPage: ${currentNavigationPage.id}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -216,9 +216,6 @@ export class Frame extends frameCommon.Frame {
|
||||
public _navigateCore(backstackEntry: definition.BackstackEntry) {
|
||||
trace.write(`_navigateCore; id: ${backstackEntry.resolvedPage.id}; backstackVisible: ${this._isEntryBackstackVisible(backstackEntry)}; clearHistory: ${backstackEntry.entry.clearHistory};`, trace.categories.Navigation);
|
||||
|
||||
//this._printFrameBackStack();
|
||||
//this._printNativeBackStack();
|
||||
|
||||
var activity = this._android.activity;
|
||||
if (!activity) {
|
||||
// We do not have an Activity yet associated. In this case we have two execution paths:
|
||||
@@ -300,9 +297,7 @@ export class Frame extends frameCommon.Frame {
|
||||
}
|
||||
|
||||
// Add to backStack if needed.
|
||||
if (this.backStack.length > 0 &&
|
||||
this._currentEntry &&
|
||||
this._isEntryBackstackVisible(this._currentEntry)) {
|
||||
if (this.backStack.length > 0 && this._currentEntry) {
|
||||
// We add each entry in the backstack to avoid the "Stack corrupted" mismatch
|
||||
var backstackTag = this._currentEntry[BACKSTACK_TAG];
|
||||
fragmentTransaction.addToBackStack(backstackTag);
|
||||
@@ -327,11 +322,6 @@ export class Frame extends frameCommon.Frame {
|
||||
|
||||
fragmentTransaction.commit();
|
||||
trace.write("fragmentTransaction.commit();", trace.categories.NativeLifecycle);
|
||||
|
||||
//setTimeout(() => {
|
||||
// this._printFrameBackStack();
|
||||
// this._printNativeBackStack();
|
||||
//}, 100);
|
||||
}
|
||||
|
||||
public _goBackCore(backstackEntry: definition.BackstackEntry) {
|
||||
|
||||
Reference in New Issue
Block a user