Update the message cache when a message is flagged #2800
Merged
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.
When a message is flagged in the front-end (marked as seen, starred, etc) we send the change to IMAP, but the local cache is not updated directly. Hence there is a small time frame where the displayed information or search is incorrect.
To test, open the app and mark a message as unseen. Then quickly reload the page.
On master: the flagged message is shows as seen again. Wait for the sync or press r to see the cache catch up
On this PR: flag change is persisted immediately in the DB, hence after a reload you directly get the "correct" state.
@nextcloud/mail for review & test :)