Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/core/ui/frame/frame-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ export class FrameBase extends CustomLayoutView implements FrameDefinition {

@profile
public onLoaded() {
/**
* In android 12 and newer, back press can exit app without finishing activity but still removes the frame from stack.
* In that case, we rely on loaded lifecycle to add the frame back.
* Also, make sure the loaded lifecycle does not attempt to push the frame when it's already in the stack but is not the topmost.
*/
if (this._currentEntry && !this._isInFrameStack) {
this._pushInFrameStack();
}

super.onLoaded();
this._processNextNavigationEntry();
}
Expand Down
8 changes: 0 additions & 8 deletions packages/core/ui/frame/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,6 @@ export class Frame extends FrameBase {
super.disposeNativeView();
}

public _popFromFrameStack() {
if (!this._isInFrameStack) {
return;
}

super._popFromFrameStack();
}

public _getNavBarVisible(page: Page): boolean {
switch (this.actionBarVisibility) {
case 'never':
Expand Down
Loading