-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix a rare crash on featured image confirmation dialog #20836
Merged
aditi-bhatia
merged 3 commits into
trunk
from
issue/20535-fix-crash-on-featured-image-dialog
May 18, 2024
Merged
Fix a rare crash on featured image confirmation dialog #20836
aditi-bhatia
merged 3 commits into
trunk
from
issue/20535-fix-crash-on-featured-image-dialog
May 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
irfano
force-pushed
the
issue/20535-fix-crash-on-featured-image-dialog
branch
from
May 16, 2024 13:45
08b545a
to
98eb43b
Compare
irfano
force-pushed
the
issue/20535-fix-crash-on-featured-image-dialog
branch
from
May 16, 2024 14:00
98eb43b
to
62250f0
Compare
Quality Gate passedIssues Measures |
aditi-bhatia
approved these changes
May 18, 2024
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.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes some parts of #20535.
The crash message is "Can not perform this action after onSaveInstanceState" and occurs when attempting to show the featured image confirmation dialog after
onSaveInstanceState
has been called. This indicates that the code attempts to display the dialog even when the fragment is not active.This PR adds a check to the fragment's state and doesn't run the code to show the dialog if the fragment's state is saved.
To Test:
I couldn't reproduce the crash. But follow the following items to test this change doesn't break anything.
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
-N/A
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):
WordPress.com sites and self-hosted Jetpack sites.Portrait and landscape orientations.Light and dark modes.Fonts: Larger, smaller and bold text.High contrast.Talkback.Languages with large words or with letters/accents not frequently used in English.Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)Large and small screen sizes. (Tablet and smaller phones)Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)