mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(frame): push recreated frame back in frameStack when Don't Keep Activities enabled (#8096)
This commit is contained in:
committed by
GitHub
parent
786aca3039
commit
47f4c25a69
@@ -216,11 +216,11 @@ export class FrameBase extends CustomLayoutView implements FrameDefinition {
|
||||
traceWrite(`NAVIGATE`, traceCategories.Navigation);
|
||||
}
|
||||
|
||||
this._pushInFrameStack();
|
||||
|
||||
const entry = buildEntryFromArgs(param);
|
||||
const page = Builder.createViewFromEntry(entry) as Page;
|
||||
|
||||
this._pushInFrameStack();
|
||||
|
||||
const backstackEntry: BackstackEntry = {
|
||||
entry: entry,
|
||||
resolvedPage: page,
|
||||
|
||||
@@ -483,6 +483,13 @@ export class Frame extends FrameBase {
|
||||
}
|
||||
|
||||
public createNativeView() {
|
||||
// Create native view with available _currentEntry occur in Don't Keep Activities
|
||||
// scenario when Activity is recreated on app suspend/resume. Push frame back in frame stack
|
||||
// since it was removed in disposeNativeView() method.
|
||||
if (this._currentEntry) {
|
||||
this._pushInFrameStack();
|
||||
}
|
||||
|
||||
return new org.nativescript.widgets.ContentLayout(this._context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user