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
1 changed files with 13 additions and 11 deletions

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);
}
/*