1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-16 06:25:06 -05:00

More fix for issue 810: Delete intents are not also broadcasted when we delete a message because it was deleted on the server

This commit is contained in:
Bao-Long Nguyen-Trong 2009-12-15 19:43:46 +00:00
parent dc2f752f11
commit 18ea30d00f

View File

@ -1507,14 +1507,23 @@ public class MessagingController implements Runnable
{ {
Message localMessage = localFolder.getMessage(remoteMessage.getUid()); Message localMessage = localFolder.getMessage(remoteMessage.getUid());
boolean messageChanged = syncFlags(localMessage, remoteMessage); boolean messageChanged = syncFlags(localMessage, remoteMessage);
if (messageChanged)
if (messageChanged && isMessageSuppressed(account, folder, localMessage) == false) {
if (isMessageSuppressed(account, folder, localMessage) == false)
{ {
for (MessagingListener l : getListeners()) for (MessagingListener l : getListeners())
{ {
l.synchronizeMailboxAddOrUpdateMessage(account, folder, localMessage); l.synchronizeMailboxAddOrUpdateMessage(account, folder, localMessage);
} }
} }
if (localMessage.isSet(Flag.DELETED))
{
for (MessagingListener l : getListeners())
{
l.synchronizeMailboxRemovedMessage(account, folder, localMessage);
}
}
}
} }
} }
Log.i(K9.LOG_TAG, "SYNC: Synced remote messages for folder " + folder + ", " + newMessages.get() + " new messages"); Log.i(K9.LOG_TAG, "SYNC: Synced remote messages for folder " + folder + ", " + newMessages.get() + " new messages");