1

I am making an app which lets the user keep notes. One of the features is that the notes can be synced to a remote server and can also be edited online from the website.

Here is a scenario that I do not know how to deal with:
Say that the user has created a note on their phone (and stored it on the remote server) and now the user wants to delete it. The user hits the delete button and the pending deletion flag has been set. However, the note could not be deleted from the remote server because the user is offline.

As soon as the app is back online, it will delete all the pending deletion files from the remote server.

There can be a lot of time before the user comes back online and in the meantime may also edit the note online from the website.

Should undelete be an option?

I think not because I have already asked the user if he/she is sure for deletion. However, since I am a novice developer, I would like some insight into this.

2

Keep track of a last edited date, in case the note online has been edited more recently than the deleted note it's best not to delete the note. You could offer a message inside the note at the top when it's opened along the lines of

This note was deleted on '<devicename>', but later edited on <date>                                          [delete]

If the note has not been edited afterwards I would simply delete it blindly or move it to some kind of 'trash' bin. Trash bins can be used instead of (or in addition to) deletion confirmations as well, where only an undo option is shown to the user after deleting a note which moves the object back from the trash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.