summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-07-11 14:03:57 (GMT)
committerSwift Review <review@swift.im>2014-07-27 14:09:54 (GMT)
commitfde89fee2175e7cbeda9262e7517f153de76e1b8 (patch)
tree9834c5d04a66c84fe50b1719e16c3749123fa8ff /Swift/Controllers/Chat/ChatController.cpp
parent9353d3c692e1cd37bdd15b8dbe75b92be5eaa1c0 (diff)
downloadswift-fde89fee2175e7cbeda9262e7517f153de76e1b8.zip
swift-fde89fee2175e7cbeda9262e7517f153de76e1b8.tar.bz2
Fix recent chat items not being shown for private MUC messages.
Test-Information: Send private message and verify that the private message item in the recents list is erased when the user leaves the MUC and the chat window is closed. Check that other recent items are not removed. Check that private message recent items are not saved and loaded when the application is restarted. Change-Id: I62b9d324143d2e77ed98592cf37fb681165285c2
Diffstat (limited to 'Swift/Controllers/Chat/ChatController.cpp')
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index 9df7708..9b65c9f 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -95,6 +95,7 @@ ChatController::ChatController(const JID& self, StanzaChannel* stanzaChannel, IQ
chatWindow_->onBlockUserRequest.connect(boost::bind(&ChatController::handleBlockUserRequest, this));
chatWindow_->onUnblockUserRequest.connect(boost::bind(&ChatController::handleUnblockUserRequest, this));
chatWindow_->onInviteToChat.connect(boost::bind(&ChatController::handleInviteToChat, this, _1));
+ chatWindow_->onClosed.connect(boost::bind(&ChatController::handleWindowClosed, this));
handleBareJIDCapsChanged(toJID_);
settings_->onSettingChanged.connect(boost::bind(&ChatController::handleSettingChanged, this, _1));
@@ -306,6 +307,10 @@ void ChatController::handleInviteToChat(const std::vector<JID>& droppedJIDs) {
eventStream_->send(event);
}
+void ChatController::handleWindowClosed() {
+ onWindowClosed();
+}
+
void ChatController::handleUIEvent(boost::shared_ptr<UIEvent> event) {
boost::shared_ptr<InviteToMUCUIEvent> inviteEvent = boost::dynamic_pointer_cast<InviteToMUCUIEvent>(event);
if (inviteEvent && inviteEvent->getRoom() == toJID_.toBare()) {