author | alwin <alwin> | 2005-03-12 02:15:18 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-12 02:15:18 (UTC) |
commit | f6fa2808753f84a66037d8ca4f62f7ce412a386b (patch) (unidiff) | |
tree | fd6c9a3f20306a2e9d9a891d520fa2d214b1aaaa | |
parent | cd1b9f7c11c73ef0df0ce66c53466c979a3a4d42 (diff) | |
download | opie-f6fa2808753f84a66037d8ca4f62f7ce412a386b.zip opie-f6fa2808753f84a66037d8ca4f62f7ce412a386b.tar.gz opie-f6fa2808753f84a66037d8ca4f62f7ce412a386b.tar.bz2 |
as in most other applets mails on pop3-acounts counts always as
new mail
-rw-r--r-- | noncore/net/mail/libmailwrapper/statusmail.cpp | 12 |
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 | |||
@@ -42,17 +42,17 @@ void StatusMail::initAccounts(QList<Account>&accounts) | |||
42 | POP3account *pop3 = static_cast<POP3account *>(it); | 42 | POP3account *pop3 = static_cast<POP3account *>(it); |
43 | current = AbstractMail::getWrapper(pop3); | 43 | current = AbstractMail::getWrapper(pop3); |
44 | connectionList.append(current); | 44 | connectionList.append(current); |
45 | current->statusFolder(currentStat); | 45 | current->statusFolder(currentStat); |
46 | currentPop3Stat.message_count+=currentStat.message_count; | 46 | currentPop3Stat.message_count+=currentStat.message_count; |
47 | } | 47 | } |
48 | current->logout(); | 48 | current->logout(); |
49 | } | 49 | } |
50 | odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl; | 50 | odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl; |
51 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; | 51 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; |
52 | lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; | 52 | lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; |
53 | lastPop3Stat.message_recent = currentPop3Stat.message_recent; | 53 | lastPop3Stat.message_recent = currentPop3Stat.message_recent; |
54 | lastPop3Stat.message_count = currentPop3Stat.message_count; | 54 | lastPop3Stat.message_count = currentPop3Stat.message_count; |
55 | } | 55 | } |
56 | 56 | ||
57 | void StatusMail::reset_status() | 57 | void StatusMail::reset_status() |
58 | { | 58 | { |
@@ -71,24 +71,30 @@ void StatusMail::check_current_stat(folderStat&targetStat) | |||
71 | it->statusFolder(currentStat); | 71 | it->statusFolder(currentStat); |
72 | it->logout(); | 72 | it->logout(); |
73 | if (it->getType() == MAILLIB::A_IMAP) { | 73 | if (it->getType() == MAILLIB::A_IMAP) { |
74 | currentImapStat.message_unseen+=currentStat.message_unseen; | 74 | currentImapStat.message_unseen+=currentStat.message_unseen; |
75 | currentImapStat.message_recent+=currentStat.message_recent; | 75 | currentImapStat.message_recent+=currentStat.message_recent; |
76 | currentImapStat.message_count+=currentStat.message_count; | 76 | currentImapStat.message_count+=currentStat.message_count; |
77 | } else if (it->getType() == MAILLIB::A_POP3) { | 77 | } else if (it->getType() == MAILLIB::A_POP3) { |
78 | currentPop3Stat.message_count+=currentStat.message_count; | 78 | currentPop3Stat.message_count+=currentStat.message_count; |
79 | odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl; | 79 | odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl; |
80 | } | 80 | } |
81 | } | 81 | } |
82 | odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl; | 82 | odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl; |
83 | |||
84 | #if 0 | ||
83 | if (currentPop3Stat.message_count > lastPop3Stat.message_count) { | 85 | if (currentPop3Stat.message_count > lastPop3Stat.message_count) { |
84 | currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; | 86 | currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; |
85 | currentPop3Stat.message_unseen = currentPop3Stat.message_recent; | 87 | currentPop3Stat.message_unseen = currentPop3Stat.message_recent; |
86 | } else { | 88 | } else { |
87 | lastPop3Stat.message_count = currentPop3Stat.message_count; | 89 | lastPop3Stat.message_count = currentPop3Stat.message_count; |
88 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; | 90 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; |
89 | } | 91 | } |
92 | #else | ||
93 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen=currentPop3Stat.message_count; | ||
94 | #endif | ||
95 | |||
90 | targetStat = currentImapStat; | 96 | targetStat = currentImapStat; |
91 | targetStat.message_unseen+=currentPop3Stat.message_unseen; | 97 | targetStat.message_unseen+=currentPop3Stat.message_unseen; |
92 | targetStat.message_recent+=currentPop3Stat.message_recent; | 98 | targetStat.message_recent+=currentPop3Stat.message_recent; |
93 | targetStat.message_count+=currentPop3Stat.message_count; | 99 | targetStat.message_count+=currentPop3Stat.message_count; |
94 | } | 100 | } |