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

Lift our initial unread counter up higher so that it happens before

called code starts resetting the unread count again.
This commit is contained in:
Jesse Vincent 2010-08-08 19:14:52 +00:00
parent 06a3d5985b
commit d2e3061f20

View File

@ -1352,6 +1352,18 @@ public class MessagingController implements Runnable
}
final String folder = remoteFolder.getName();
int unreadBeforeStart = 0;
try
{
AccountStats stats = account.getStats(mApplication);
unreadBeforeStart = stats.unreadMessageCount;
}
catch (MessagingException e)
{
Log.e(K9.LOG_TAG, "Unable to getUnreadMessageCount for account: " + account, e);
}
ArrayList<Message> syncFlagMessages = new ArrayList<Message>();
List<Message> unsyncedMessages = new ArrayList<Message>();
final AtomicInteger newMessages = new AtomicInteger(0);
@ -1499,19 +1511,9 @@ public class MessagingController implements Runnable
int unreadBeforeStart = 0;
try
{
AccountStats stats = account.getStats(mApplication);
unreadBeforeStart = stats.unreadMessageCount;
}
catch (MessagingException e)
{
Log.e(K9.LOG_TAG, "Unable to getUnreadMessageCount for account: " + account, e);
}
/*