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

Post deletion / undoing in offline mode is not working right #5811

Closed
diegoreymendez opened this issue Jul 29, 2016 · 1 comment
Closed

Post deletion / undoing in offline mode is not working right #5811

diegoreymendez opened this issue Jul 29, 2016 · 1 comment

Comments

@diegoreymendez
Copy link
Contributor

diegoreymendez commented Jul 29, 2016

Expected behavior

Deleting posts, and undoing the deletion (with no connection) should result in the post being "restored" locally.

Actual behavior

There's a combination of steps in which the post may end showing up as deleted, even though it's not.

Steps to reproduce the behavior

  1. Open the app and go to the list of posts for any blog.
  2. Set up link conditioner for 100% loss.
  3. Delete a post, and undo the deletion right afterwards.
  4. The post should be restored... now wait until the initial request times out.
  5. Voila - the post will show up as deleted.

Technical information

This is caused by the user being able to delete a post (tap Trash) and restore it (tap undo) even if there's no connection.

The sequence goes like this:

  • When the user taps "Trash" a post deletion request is sent here.
  • When the user taps "Undo" a post restore request is sent here.
  • (Remember there's no connection)
  • The first request fails and this closure is executed restoring the post.
  • The second request fails and this closure is executed showing the post as deleted (even though it isn't).

Part of the problem is this property, which works fine for a single request, but fails to store proper history when several requests are chained.

Tested on the Simulator, iOS 9.3 iPhone 5, WPiOS 6.4

/fyi @sendhil, @aerych (check out the tech section if you can, I believe we may need to block multiple requests at the GUI level).

@diegoreymendez diegoreymendez added this to the 6.5 milestone Jul 29, 2016
@diegoreymendez diegoreymendez self-assigned this Jul 29, 2016
@astralbodies astralbodies modified the milestones: 6.5, 6.8 Nov 3, 2016
@astralbodies astralbodies modified the milestones: 6.8, Pending Feb 6, 2017
@diegoreymendez diegoreymendez removed their assignment Jun 29, 2017
@kean
Copy link
Contributor

kean commented Oct 31, 2023

Fixed in the scope of #21907 and #21724. Post deletion now works the same way as all other actions on posts: with no optimistic UI. And there the "Undo" was also removed to simplify the screen, as practically nobody was using it.

@kean kean closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants