diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-16 20:24:39 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-16 20:24:39 (GMT) |
commit | 5adcba3ba42a0f7cfde8dfdf6aa6f322077c3744 (patch) | |
tree | 47cc5ea588b5508a29b70cd353a0bbff853cf389 /Swift/Controllers | |
parent | 63b311c1bb60469eb5e2ccd2107739e11b189a15 (diff) | |
download | swift-contrib-5adcba3ba42a0f7cfde8dfdf6aa6f322077c3744.zip swift-contrib-5adcba3ba42a0f7cfde8dfdf6aa6f322077c3744.tar.bz2 |
Show the correct (unavailable) presence for a MUC in the recents list after leaving.
Resolves: #932
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/Chat/ChatsManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index 5c0475d..05017e7 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp @@ -271,6 +271,8 @@ void ChatsManager::handleUserLeftMUC(MUCController* mucController) { foreach (ChatListWindow::Chat& chat, recentChats_) { if (chat.isMUC && chat.jid == (*it).first) { chat.statusType = StatusShow::None; + chatListWindow_->setRecents(recentChats_); + break; } } mucControllers_.erase(it); @@ -324,7 +326,7 @@ void ChatsManager::handlePresenceChange(boost::shared_ptr<Presence> newPresence) if (mucRegistry_->isMUC(newPresence->getFrom().toBare())) return; foreach (ChatListWindow::Chat& chat, recentChats_) { - if (newPresence->getFrom().toBare() == chat.jid.toBare()) { + if (newPresence->getFrom().toBare() == chat.jid.toBare() && !chat.isMUC) { Presence::ref presence = presenceOracle_->getHighestPriorityPresence(chat.jid.toBare()); chat.setStatusType(presence ? presence->getShow() : StatusShow::None); chatListWindow_->setRecents(recentChats_); |