summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-01-09 12:38:04 (UTC)
committer harlekin <harlekin>2004-01-09 12:38:04 (UTC)
commit8dd8648b0e82b16bcb0c976d330eaf670081a748 (patch) (side-by-side diff)
tree6d13a28c634503292a00aff34e99d594c51d097c
parentd3a4757e062ffc5ce5840cb1c52215435a468ff0 (diff)
downloadopie-8dd8648b0e82b16bcb0c976d330eaf670081a748.zip
opie-8dd8648b0e82b16bcb0c976d330eaf670081a748.tar.gz
opie-8dd8648b0e82b16bcb0c976d330eaf670081a748.tar.bz2
only read accounts that are set online
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp
index 1d7d559..172c58f 100644
--- a/noncore/net/mail/libmailwrapper/statusmail.cpp
+++ b/noncore/net/mail/libmailwrapper/statusmail.cpp
@@ -18,33 +18,33 @@ StatusMail::~StatusMail()
}
void StatusMail::initAccounts(QList<Account>&accounts)
{
Account *it;
folderStat currentStat;
AbstractMail * current = 0;
currentPop3Stat.message_count=0;
currentPop3Stat.message_recent=0;
currentPop3Stat.message_unseen=0;
for ( it = accounts.first(); it; it = accounts.next() ) {
- if ( it->getType().compare( "IMAP" ) == 0 ) {
+ if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) {
IMAPaccount*ima = static_cast<IMAPaccount *>(it);
current = AbstractMail::getWrapper(ima);
connectionList.append(current);
current->statusFolder(currentStat);
currentImapStat.message_count+=currentStat.message_unseen;
currentImapStat.message_count+=currentStat.message_recent;
currentImapStat.message_count+=currentStat.message_count;
- } else if ( it->getType().compare( "POP3" ) == 0 ) {
+ } else if ( it->getType().compare( "POP3" ) == 0 && !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();
}
qDebug("Pop3 init count: %i",currentPop3Stat.message_count);
currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0;
lastPop3Stat.message_unseen = currentPop3Stat.message_unseen;
lastPop3Stat.message_recent = currentPop3Stat.message_recent;