1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

If we hit a race condition and download a message after it's already

been marked as suppressed, then don't actually save it locally
This commit is contained in:
Jesse Vincent 2010-07-08 15:49:26 +00:00
parent 190b597a45
commit fd234c2701

View File

@ -1620,6 +1620,21 @@ public class MessagingController implements Runnable
{ {
try try
{ {
if (isMessageSuppressed(account, folder, message ))
{
if (K9.DEBUG)
{
Log.d(K9.LOG_TAG, "Message " + message.getUid() + " was suppressed "+
"but just downloaded. "+
"The race condition means we wasted some bandwidth. Oh well.");
}
progress.incrementAndGet();
return;
}
if (message.olderThan(earliestDate)) if (message.olderThan(earliestDate))
{ {
if (K9.DEBUG) if (K9.DEBUG)