mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -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:
parent
9cd52d5ef3
commit
4f65b4270e
@ -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
|
||||
@ -1323,18 +1323,21 @@ public class MessagingController implements Runnable
|
||||
Message localMessage = localFolder.getMessage(message.getUid());
|
||||
syncFlags(localMessage, message);
|
||||
if (K9.DEBUG)
|
||||
Log.v(K9.LOG_TAG, "About to notify listeners that we got a new unsynced message "
|
||||
+ account + ":" + folder + ":" + message.getUid());
|
||||
Log.v(K9.LOG_TAG, "About to notify listeners that we got a new unsynced message "
|
||||
+ account + ":" + folder + ":" + message.getUid());
|
||||
for (MessagingListener l : getListeners())
|
||||
{
|
||||
l.synchronizeMailboxAddOrUpdateMessage(account, folder, localMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// Send a notification of this message
|
||||
if (!message.isSet(Flag.SEEN))
|
||||
{
|
||||
notifyAccount(mApplication, account, message);
|
||||
// Send a notification of this message
|
||||
if (!message.isSet(Flag.SEEN) &&
|
||||
(account.isNotifySelfNewMail() || account.isAnIdentity(message.getFrom()) == false))
|
||||
{
|
||||
notifyAccount(mApplication, account, message);
|
||||
newMessages.incrementAndGet();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user