-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix-next(frame): remove current entry fragment on reset root view #5533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
test branch_modal_navigation#vchimev/reset-root-view --ignore |
@@ -176,6 +176,18 @@ export class Frame extends FrameBase { | |||
} | |||
} | |||
|
|||
_onRootViewReset(): void { | |||
if (this._currentEntry && this._currentEntry.fragment) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract the common logic from _onRootViewReset() and onUnloaded() to avoid code duplication e.g. method cleanupCurrentFragment(...) / disposeCurrentFragment(...) or something like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After addressing comment for code duplication.
Extract the common logic from _onRootViewReset() and onUnloaded() methods to avoid code duplication.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Problem:
When we reset root view and minimize/restore application with "Don't keep activities" turned ON, we try to restore the latest fragment. However, it is not available anymore, so could not be restored. In this case, remove it when changing root view in order to create a new one.
Steps to reproduce:
TabView
as the application rootStack trace: