Skip to content
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

Offline Support: Posts no longer removed when discarding changes. #9989



None yet
2 participants
Copy link

commented Aug 15, 2018


Fixes #9985.

Posts were being removed from the local list if the device was offline and the user discarded changes to the post under certain conditions (steps described in #9985).


This PR changes two things:

  1. It removes the shouldRemoveOnDismiss from AbstractPost. AbstractPost should not be aware or define VC logic.
  2. Removes a condition for the post removal logic. I analyzed the condition trying to understand if it's necessary, and couldn't really come up with any reason to keep that logic.


  1. Edit an existing published post
  2. Turn on airplane mode
  3. Change some text
  4. Publish & exit the editor
  5. You should see the post with the changes and an "Upload failed" message.
  6. Open the post again
  7. Make some more changes.
  8. Try to exit, and discard the changes.
  9. The post should be back to what it at the last successful syncrhonization.

@diegoreymendez diegoreymendez added this to the 10.8 milestone Aug 15, 2018

@diegoreymendez diegoreymendez self-assigned this Aug 15, 2018

@diegoreymendez diegoreymendez requested a review from frosty Aug 15, 2018


frosty approved these changes Aug 16, 2018

Copy link

left a comment

Looks good! Tested the steps on develop and my post disappeared, tested them here and it remained. Thanks for taking this on!

@diegoreymendez diegoreymendez merged commit 23a7eaa into develop Aug 16, 2018

3 checks passed

Buddybuild : WordPress/57a120bbe0f5520100e11c19 Build succeeded
Hound No violations found. Woof!
danger/danger All green. Well done.

@diegoreymendez diegoreymendez deleted the issue/9985-offline-discard-making-post-disappear branch Aug 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.