Closed SergioEstevao closed 8 years ago
Reviewing now @SergioEstevao :smile:
It looks like -editorViewController:mediaRemoved:
is only being called when I have a post with just an image and I either delete it or click on it to cancel. If I put an image between two paragraphs of text this method is not called.
@astralbodies ready for another round of review. I converted the NSLog to DDLogInfo so remember to switch to the correct log level on the WPEditorDemoLoggingConfiguration.m in order to see the remove message.
Looks like deleting the image calls the delegate - awesome! It appears that tapping the image and selecting cancel upload does not call the delegate now ever.
@astralbodies: This is expected because when tapping and selecting to cancel then code path goes the other way around, the Native code sends a message to the web view to remove the image, so no callback is needed to notify that the image was removed.
Got it - then we're good :shipit:
As long as @sendhil is okay with putting this in 6.1 :smile:
This is a bad bug to have in editor so I should we should add it to 6.1.
I'm going to merge this on the editor, then we can make the decision on the main repo if we want this fix in.
Fixes #627
How to test:
Insert a media object on the post (video or image), check if on removal of the media event while the upload is happening a console message say "Media Removed: XXX"
Needs Review: @astralbodies