diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/imap/MCIMAPSession.cc | 8 | ||||
-rw-r--r-- | src/core/imap/MCIMAPSession.h | 3 | ||||
-rw-r--r-- | src/core/pop/MCPOPSession.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/core/imap/MCIMAPSession.cc b/src/core/imap/MCIMAPSession.cc index c22f082b..4e9dc3b8 100644 --- a/src/core/imap/MCIMAPSession.cc +++ b/src/core/imap/MCIMAPSession.cc @@ -281,6 +281,7 @@ void IMAPSession::init() mVoIPEnabled = true; mDelimiter = 0; + mBodyProgressEnabled = true; mIdleEnabled = false; mXListEnabled = false; mWelcomeString = NULL; @@ -1718,12 +1719,16 @@ Array * IMAPSession::fetchMessages(String * folder, IMAPMessagesRequestKind requ mailimap_set_msg_att_handler(mImap, msg_att_handler, &msg_att_data); + mBodyProgressEnabled = false; + if (fetchByUID) { r = mailimap_uid_fetch(mImap, imapset, fetch_type, &fetch_result); } else { r = mailimap_fetch(mImap, imapset, fetch_type, &fetch_result); } + mBodyProgressEnabled = true; + mProgressCallback = NULL; mLastFetchedSequenceNumber = msg_att_data.mLastFetchedSequenceNumber; @@ -2290,6 +2295,9 @@ HashMap * IMAPSession::identity(String * vendor, String * name, String * version void IMAPSession::bodyProgress(unsigned int current, unsigned int maximum) { + if (!mBodyProgressEnabled) + return; + if (mProgressCallback != NULL) { mProgressCallback->bodyProgress(this, current, maximum); } diff --git a/src/core/imap/MCIMAPSession.h b/src/core/imap/MCIMAPSession.h index ea9a39cd..5581aca0 100644 --- a/src/core/imap/MCIMAPSession.h +++ b/src/core/imap/MCIMAPSession.h @@ -30,6 +30,7 @@ namespace mailcore { char mDelimiter; IMAPNamespace * mDefaultNamespace; + bool mBodyProgressEnabled; bool mIdleEnabled; bool mXListEnabled; String * mWelcomeString; @@ -72,7 +73,7 @@ namespace mailcore { virtual void setPort(unsigned int port); virtual unsigned int port(); - virtual void setUsername(String * login); + virtual void setUsername(String * username); virtual String * username(); virtual void setPassword(String * password); diff --git a/src/core/pop/MCPOPSession.h b/src/core/pop/MCPOPSession.h index d0d8dc4e..523e1be6 100644 --- a/src/core/pop/MCPOPSession.h +++ b/src/core/pop/MCPOPSession.h @@ -48,7 +48,7 @@ namespace mailcore { virtual void setPort(unsigned int port); virtual unsigned int port(); - virtual void setUsername(String * login); + virtual void setUsername(String * username); virtual String * username(); virtual void setPassword(String * password); |