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

[Feature]Always mark read when archiving email messages #8602

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shamim-emon
Copy link
Contributor

@shamim-emon shamim-emon commented Nov 22, 2024

Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check this comment for additional requirements for this behavior change.

Unfortunately, this change doesn't achieve the desired effect.

  1. MessagingController.moveOrCopyMessageSynchronous() is used for all move operations, not just for moving a message to the archive folder. However, we don't want all moved messages to automatically be marked as read.
  2. Calling setFlag() on a LocalMessage instance will only mark the message as read locally, not on the server.

MessagingController always changes the local message state first, then enqueues a "command" that will perform the message changes on the server. By separating local changes from remote changes the app can be used offline. When connectivity returns the queue of remote operations will be processed.

There's already MoveOrCopyFlavor.MOVE_AND_MARK_AS_READ. Previously, there was no reason for MessagingController.moveOrCopyMessageSynchronous() to support this functionality. Now, adding support for MOVE_AND_MARK_AS_READ to this method would make it trivial to then change the behavior of only the archive action.

Please feel free to ask in the developer Matrix room if you have questions on any of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Always mark read when archiving email messages
2 participants