-
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
Fixed crash when trying to reupload nonexistent media. #10791
Conversation
You can test the changes on this Pull Request by downloading the APK here. |
Howdy folks! I'm freezing |
@@ -509,6 +509,7 @@ public void onClick(DialogInterface dialog, int id) { | |||
public void onClick(DialogInterface dialog, int id) { | |||
dialog.dismiss(); | |||
mEditorFragmentListener.onMediaDeleted(String.valueOf(mediaId)); | |||
mFailedMediaIds.remove(String.valueOf(mediaId)); |
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.
Note (unrelated) for clarity: while testing this PR step by step, I noticed we should also be doing this when the user taps on the trash bin icon to delete the block (as opposed to "removing" the image from the block, without removing the actual empty image block).
Given that action isn't related to what this PR specifically fixes, going to check and open a new issue separately if merits.
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.
Tracked this in wordpress-mobile/gutenberg-mobile#1595
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.
I confirm the described issue is gone after applying this PR 👍 - should be good to go after resolving the conflicts with the target branch @khaykov, approving
Sentry issue: WORDPRESS-ANDROID-79M |
Fixes #10609
When removing an image that failed to upload, we were not removing it from the failed media list, which we use to reupload all media.
To test:
PR submission checklist:
I have considered adding unit tests where possible.
I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txt
if necessary.