WordPress-Android
WordPress-Android copied to clipboard
Offline Mode: Detect Conflict
Tasks
- [ ] When updating a post that’s been previously uploaded to the server and has an associated identifier (includes all types of posts), make sure the app checks for conflicts in the content during the upload
- [ ] If it detects a conflict, transition into the Failed state
- [ ] Show regular post actions in the context menu
- [ ] If you tap on the post or the error indicator, show the "Resolve Conflict" screen
Notes
- Use the if_not_modified_since parameter when updating posts to ensure that the app is up to date with the remote. If it throws 409 (Conflict), pull the latest version of the post and resolve conflicts if needed (care for false positives when modified date changes but content does not).
- There are two scenarios when the app can detect a conflict: during the upload and when refreshing the post list. The later can happen if the post has unsaved changes (covered later). When there is a conflict, the status says “Version Conflict”.