summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp
index 7e14df3..4d87e56 100644
--- a/noncore/net/mail/libmailwrapper/statusmail.cpp
+++ b/noncore/net/mail/libmailwrapper/statusmail.cpp
@@ -38,25 +38,25 @@ void StatusMail::initAccounts(QList<Account>&accounts)
currentImapStat.message_count+=currentStat.message_unseen;
currentImapStat.message_count+=currentStat.message_recent;
currentImapStat.message_count+=currentStat.message_count;
} else if ( it->getType() == MAILLIB::A_POP3 && !it->getOffline() ) {
POP3account *pop3 = static_cast<POP3account *>(it);
current = AbstractMail::getWrapper(pop3);
connectionList.append(current);
current->statusFolder(currentStat);
currentPop3Stat.message_count+=currentStat.message_count;
}
current->logout();
}
- odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl;
+ odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl;
currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0;
lastPop3Stat.message_unseen = currentPop3Stat.message_unseen;
lastPop3Stat.message_recent = currentPop3Stat.message_recent;
lastPop3Stat.message_count = currentPop3Stat.message_count;
}
void StatusMail::reset_status()
{
lastPop3Stat = currentPop3Stat;
}
void StatusMail::check_current_stat(folderStat&targetStat)
@@ -67,28 +67,34 @@ void StatusMail::check_current_stat(folderStat&targetStat)
currentPop3Stat.message_count = 0;
currentPop3Stat.message_unseen = 0;
currentImapStat = currentPop3Stat;
for ( it = connectionList.first(); it; it = connectionList.next() ) {
it->statusFolder(currentStat);
it->logout();
if (it->getType() == MAILLIB::A_IMAP) {
currentImapStat.message_unseen+=currentStat.message_unseen;
currentImapStat.message_recent+=currentStat.message_recent;
currentImapStat.message_count+=currentStat.message_count;
} else if (it->getType() == MAILLIB::A_POP3) {
currentPop3Stat.message_count+=currentStat.message_count;
- odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl;
+ odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl;
}
}
- odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl;
+ odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl;
+
+#if 0
if (currentPop3Stat.message_count > lastPop3Stat.message_count) {
currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count;
currentPop3Stat.message_unseen = currentPop3Stat.message_recent;
} else {
lastPop3Stat.message_count = currentPop3Stat.message_count;
currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0;
}
+#else
+ currentPop3Stat.message_recent = currentPop3Stat.message_unseen=currentPop3Stat.message_count;
+#endif
+
targetStat = currentImapStat;
targetStat.message_unseen+=currentPop3Stat.message_unseen;
targetStat.message_recent+=currentPop3Stat.message_recent;
targetStat.message_count+=currentPop3Stat.message_count;
}