diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-10-24 14:25:14 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-10-24 14:26:15 (GMT) |
commit | 9d3b9903fcf830599c1b46fd1725f4d1d197e966 (patch) | |
tree | d34bf9e7ebef1531a09386eff963f301334dbdf8 /Swift | |
parent | 77fbff68d5aa3a292a3cb2aae4fdaf7f5619116a (diff) | |
download | swift-9d3b9903fcf830599c1b46fd1725f4d1d197e966.zip swift-9d3b9903fcf830599c1b46fd1725f4d1d197e966.tar.bz2 |
Rejoin MUCs on reconnect.
Resolves: #625
Release-Notes: MUCs will once again be rejoined on reconnect.
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/Controllers/MainController.cpp | 14 | ||||
-rw-r--r-- | Swift/Controllers/MainController.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index 26d29e7..614e2d2 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp @@ -296,9 +296,11 @@ void MainController::handleConnected() { vcardManager_->requestOwnVCard(); - setManagersOnline(true); - //Send presence last to catch all the incoming presences. + rosterController_->setEnabled(true); + /* Send presence later to catch all the incoming presences. */ sendPresence(statusTracker_->getNextPresence()); + /* Enable chats last of all, so rejoining MUCs has the right sent presence */ + chatsManager_->setOnline(true); } void MainController::handleEventQueueLengthChange(int count) { @@ -511,15 +513,15 @@ void MainController::logout() { rosterController_->getWindow()->setMyStatusText(""); myStatusLooksOnline_ = false; } - setManagersOnline(false); + setManagersOffline(); } -void MainController::setManagersOnline(bool enabled) { +void MainController::setManagersOffline() { if (chatsManager_) { - chatsManager_->setOnline(enabled); + chatsManager_->setOnline(false); } if (rosterController_) { - rosterController_->setEnabled(enabled); + rosterController_->setEnabled(false); } } diff --git a/Swift/Controllers/MainController.h b/Swift/Controllers/MainController.h index 2f01fd2..868f966 100644 --- a/Swift/Controllers/MainController.h +++ b/Swift/Controllers/MainController.h @@ -115,7 +115,7 @@ namespace Swift { void performLoginFromCachedCredentials(); void reconnectAfterError(); - void setManagersOnline(bool enabled); + void setManagersOffline(); void handleNotificationClicked(const JID& jid); VCardStorage* getVCardStorageForProfile(const JID& jid); |