Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(modal): persist modal through configuration changes #9533

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

Merged
merged 8 commits into from
Sep 4, 2021

Conversation

edusperoni
Copy link
Contributor

@edusperoni edusperoni commented Sep 3, 2021

PR Checklist

What is the current behavior?

When you change the device configuration, the activities will be destroyed and the app will recreate them. This includes dialogs.

Currently, doing this will crash because we're clearing the dialog's options and dismissing the modal.

What is the new behavior?

We no longer dismiss the modal or clear it's config if it's happening during a configuration change.

Also, we cache the activity because this.getActivity() can return null if the modal has been detached from the activity.

@cla-bot cla-bot bot added the cla: yes label Sep 3, 2021
@NathanWalker NathanWalker changed the base branch from master to release/8.1.0 September 4, 2021 01:31
@NathanWalker NathanWalker merged commit f3cd3d3 into release/8.1.0 Sep 4, 2021
@NathanWalker NathanWalker deleted the fix/modal-config-change branch September 4, 2021 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants