From 18ea30d00fa868bc0deb3ed3d0954dcc8010ab9f Mon Sep 17 00:00:00 2001 From: Bao-Long Nguyen-Trong Date: Tue, 15 Dec 2009 19:43:46 +0000 Subject: [PATCH] More fix for issue 810: Delete intents are not also broadcasted when we delete a message because it was deleted on the server --- src/com/fsck/k9/MessagingController.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/com/fsck/k9/MessagingController.java b/src/com/fsck/k9/MessagingController.java index 478b6de94..9a110f6c8 100644 --- a/src/com/fsck/k9/MessagingController.java +++ b/src/com/fsck/k9/MessagingController.java @@ -1507,12 +1507,21 @@ public class MessagingController implements Runnable { Message localMessage = localFolder.getMessage(remoteMessage.getUid()); boolean messageChanged = syncFlags(localMessage, remoteMessage); - - if (messageChanged && isMessageSuppressed(account, folder, localMessage) == false) + if (messageChanged) { - for (MessagingListener l : getListeners()) + if (isMessageSuppressed(account, folder, localMessage) == false) { - l.synchronizeMailboxAddOrUpdateMessage(account, folder, localMessage); + for (MessagingListener l : getListeners()) + { + l.synchronizeMailboxAddOrUpdateMessage(account, folder, localMessage); + } + } + if (localMessage.isSet(Flag.DELETED)) + { + for (MessagingListener l : getListeners()) + { + l.synchronizeMailboxRemovedMessage(account, folder, localMessage); + } } } }