Skip to content

Commit

Permalink
[qmf] Update account lastSyncTime when IMAP IDLE disconnects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerio Valerio committed Dec 7, 2014
1 parent 3a47231 commit 2e74445
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qmf/src/plugins/messageservices/imap/imapservice.cpp
Expand Up @@ -1582,6 +1582,7 @@ void ImapService::disable()
const bool hasPersistentConnection = (account.status() & QMailAccount::HasPersistentConnection);
if (hasPersistentConnection) {
account.setStatus(QMailAccount::HasPersistentConnection, false);
account.setLastSynchronized(QMailTimeStamp::currentDateTime());
if (!QMailStore::instance()->updateAccount(&account)) {
qWarning() << "Unable to update account" << account.id() << "to HasPersistentConnection" << false;
} else {
Expand Down Expand Up @@ -1790,6 +1791,7 @@ void ImapService::stopPushEmail()
const bool hasPersistentConnection = (account.status() & QMailAccount::HasPersistentConnection);
if (hasPersistentConnection) {
account.setStatus(QMailAccount::HasPersistentConnection, false);
account.setLastSynchronized(QMailTimeStamp::currentDateTime());
if (!QMailStore::instance()->updateAccount(&account)) {
qWarning() << "Unable to update account" << account.id() << "to HasPersistentConnection" << false;
} else {
Expand Down

0 comments on commit 2e74445

Please sign in to comment.