New feature: Cancel edit (restores old state)#146
Merged
Conversation
…fied time to server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the discussion of #104, a useful feature was mentioned: cancel the edit of a note. This is interesting, because the auto-save feature directly sends all changes to the server. Therefore, the old state has to be stored in memory, and saved again if desired. This action can be triggered using the menu. It is not shown directly in the action bar, because I think it is not often needed. But we can change this very easy.
If the old state is restored, the server would nevertheless increase the
modifiedtime of the note by default. Therefore, I'm working on a patch for the server (see nextcloud/notes#4), which allows to set themodifiedtime by the client. Although, this patch is not yet merged (and of course not in a release version), this pull request for the client can be merged already: The changes are fully backward compatible (except for the fact, that restoring an old state will increase themodifiedtime on old servers, but I think we can deal with it)!Tasks done
cancel: restores old state of noteNotesClient: remove recurrent code