Correct unread message counts for stores (like Pop3Store) which are

unable to provide a server-side tracked unread message count.
This commit is contained in:
Daniel Applebaum 2009-11-03 03:21:42 +00:00
parent ee7be67f47
commit 1983a7e2a7

View file

@ -1009,10 +1009,7 @@ public class MessagingController implements Runnable {
private void setLocalUnreadCountToRemote(LocalFolder localFolder, Folder remoteFolder, int newMessageCount) throws MessagingException
{
int remoteUnreadMessageCount = remoteFolder.getUnreadMessageCount();
if (remoteUnreadMessageCount == -1) {
localFolder.setUnreadMessageCount(localFolder.getUnreadMessageCount() + newMessageCount);
}
else {
if (remoteUnreadMessageCount != -1) {
localFolder.setUnreadMessageCount(remoteUnreadMessageCount);
}
}