summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp9
-rw-r--r--Swift/Controllers/Chat/ChatsManager.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index aea5ef4..b0aef95 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -403,6 +403,14 @@ void ChatsManager::handleUIEvent(boost::shared_ptr<UIEvent> event) {
}
}
+void ChatsManager::markAllRecentsOffline() {
+ foreach (ChatListWindow::Chat& chat, recentChats_) {
+ chat.setStatusType(StatusShow::None);
+ }
+
+ chatListWindow_->setRecents(recentChats_);
+}
+
/**
* If a resource goes offline, release bound chatdialog to that resource.
*/
@@ -477,6 +485,7 @@ void ChatsManager::setOnline(bool enabled) {
delete mucBookmarkManager_;
mucBookmarkManager_ = NULL;
chatListWindow_->setBookmarksEnabled(false);
+ markAllRecentsOffline();
} else {
setupBookmarks();
}
diff --git a/Swift/Controllers/Chat/ChatsManager.h b/Swift/Controllers/Chat/ChatsManager.h
index e6666fa..a8c69c4 100644
--- a/Swift/Controllers/Chat/ChatsManager.h
+++ b/Swift/Controllers/Chat/ChatsManager.h
@@ -88,6 +88,7 @@ namespace Swift {
void handleJIDUpdatedInRoster(const JID&);
void handleRosterCleared();
void handleSettingChanged(const std::string& settingPath);
+ void markAllRecentsOffline();
void updatePresenceReceivingStateOnChatController(const JID&);