Remove 'new message' notification when user marks the message as read
We already handled the case where the message was marked as read on the server. This handles the case where the user marks the message as read locally.
This commit is contained in:
parent
504062a533
commit
7a784f1fcd
1 changed files with 11 additions and 0 deletions
|
@ -1167,6 +1167,10 @@ public class MessagingController {
|
|||
l.folderStatusChanged(account, folderId);
|
||||
}
|
||||
|
||||
if (flag == Flag.SEEN && newState) {
|
||||
cancelNotificationsForMessages(account, folderId, uids);
|
||||
}
|
||||
|
||||
if (accountSupportsFlags) {
|
||||
LocalFolder localFolder = localStore.getFolder(folderId);
|
||||
try {
|
||||
|
@ -1183,6 +1187,13 @@ public class MessagingController {
|
|||
}
|
||||
}
|
||||
|
||||
private void cancelNotificationsForMessages(Account account, long folderId, List<String> uids) {
|
||||
for (String uid : uids) {
|
||||
MessageReference messageReference = new MessageReference(account.getUuid(), folderId, uid);
|
||||
notificationController.removeNewMailNotification(account, messageReference);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set or remove a flag for a set of messages in a specific folder.
|
||||
* <p>
|
||||
|
|
Loading…
Reference in a new issue