1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Fixes Issue 1060

Don't show messages that are already deleted on the server when we
first download them.

Also, correct item 1 from my comments on r1355.  No longer notify for
mails I sent when I selected not to be notified for mails I sent.
This commit is contained in:
Daniel Applebaum 2010-01-23 17:39:28 +00:00
parent 9cd52d5ef3
commit 4f65b4270e

View File

@ -1281,12 +1281,12 @@ public class MessagingController implements Runnable
{
try
{
if (!message.isSet(Flag.SEEN))
if (message.isSet(Flag.DELETED))
{
if (account.isNotifySelfNewMail() || account.isAnIdentity(message.getFrom()) == false)
{
newMessages.incrementAndGet();
}
if (K9.DEBUG)
Log.v(K9.LOG_TAG, "Newly downloaded message " + account + ":" + folder + ":" + message.getUid()
+ " was already deleted on server, skipping");
return;
}
// Store the new message locally
@ -1329,12 +1329,15 @@ public class MessagingController implements Runnable
{
l.synchronizeMailboxAddOrUpdateMessage(account, folder, localMessage);
}
}
// Send a notification of this message
if (!message.isSet(Flag.SEEN))
if (!message.isSet(Flag.SEEN) &&
(account.isNotifySelfNewMail() || account.isAnIdentity(message.getFrom()) == false))
{
notifyAccount(mApplication, account, message);
newMessages.incrementAndGet();
}
}
}