diff options
-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); |