mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-14 05:25:07 -05:00
Merged from:
1561 | danapple0 | 2010-04-14 08:02:04 -0500 (Wed, 14 Apr 2010) | 6 lines Changed paths: M /k9mail/trunk/src/com/fsck/k9/MessagingController.java Fixes Issue 1130 Fixes Issue 1308 Some IMAP servers seem not to provide an INTERNALDATE response.
This commit is contained in:
parent
94235a69ad
commit
7938bf7caa
@ -1936,14 +1936,14 @@ public class MessagingController implements Runnable
|
||||
remoteFolder.fetch(new Message[] { remoteMessage }, fp, null);
|
||||
Date localDate = localMessage.getInternalDate();
|
||||
Date remoteDate = remoteMessage.getInternalDate();
|
||||
if (remoteDate.compareTo(localDate) > 0)
|
||||
if (remoteDate != null && remoteDate.compareTo(localDate) > 0)
|
||||
{
|
||||
/*
|
||||
* If the remote message is newer than ours we'll just
|
||||
* delete ours and move on. A sync will get the server message
|
||||
* if we need to be able to see it.
|
||||
*/
|
||||
localMessage.setFlag(Flag.DELETED, true);
|
||||
localMessage.setFlag(Flag.X_DESTROYED, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1964,11 +1964,14 @@ public class MessagingController implements Runnable
|
||||
{
|
||||
l.messageUidChanged(account, folder, oldUid, localMessage.getUid());
|
||||
}
|
||||
remoteMessage.setFlag(Flag.DELETED, true);
|
||||
if (Account.EXPUNGE_IMMEDIATELY.equals(account.getExpungePolicy()))
|
||||
{
|
||||
remoteFolder.expunge();
|
||||
}
|
||||
if (remoteDate != null)
|
||||
{
|
||||
remoteMessage.setFlag(Flag.DELETED, true);
|
||||
if (Account.EXPUNGE_IMMEDIATELY.equals(account.getExpungePolicy()))
|
||||
{
|
||||
remoteFolder.expunge();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user