Fixed the currentEntry property to return navigation entry instead of backstack entry

This commit is contained in:
Panayot Cankov
2015-11-30 17:43:57 +02:00
parent 986cf41ff6
commit 0c015820fb
4 changed files with 16 additions and 8 deletions

View File

@@ -307,8 +307,8 @@ export class Frame extends view.CustomLayoutView implements definition.Frame {
return null;
}
get currentEntry(): definition.BackstackEntry {
return this._currentEntry;
get currentEntry(): definition.NavigationEntry {
return this._currentEntry.entry;
}
public _pushInFrameStack() {

View File

@@ -290,7 +290,7 @@ export class Frame extends frameCommon.Frame {
public _onActivityCreated(isRestart: boolean) {
this._onAttached(this._android.activity);
var backstackEntry = this.currentEntry || this._delayedNavigationEntry;
var backstackEntry = this._currentEntry || this._delayedNavigationEntry;
if (isRestart) {
this._onNavigatingTo(backstackEntry, false);
@@ -672,7 +672,7 @@ function findPageForFragment(fragment: android.app.Fragment, frame: Frame) {
trace.write("Attached fragment with no page: " + fragmentTag, trace.categories.NativeLifecycle);
if (frame.currentPage && frame.currentPage[TAG] === fragmentTag) {
page = frame.currentPage;
entry = frame.currentEntry;
entry = frame._currentEntry;
trace.write("Current page matches fragment: " + fragmentTag, trace.categories.NativeLifecycle);
}
else {