summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-08 08:34:38 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-08 08:34:38 (GMT)
commit58177796fa51784da5f10298a643f972164e6d07 (patch)
tree88e063533f9410a7a57500d9212f45820cb360a2 /Swift/Controllers/Chat/ChatController.cpp
parent091f554f42dcdef534718fb759eb45b622adfd4f (diff)
downloadswift-58177796fa51784da5f10298a643f972164e6d07.zip
swift-58177796fa51784da5f10298a643f972164e6d07.tar.bz2
Cancel chat state display when offline.
Release-Notes: Contacts will no longer show as 'typing' if you go offline before they've sent the message. Resolves: #561
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 924ca97..9046dc3 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -134,6 +134,11 @@ void ChatController::setEnabled(bool enabled) {
chatWindow_->setAckState(it->second, ChatWindow::Failed);
}
unackedStanzas_.clear();
+
+ Presence::ref fakeOffline(new Presence());
+ fakeOffline->setFrom(toJID_);
+ fakeOffline->setType(Presence::Unavailable);
+ chatStateTracker_->handlePresenceChange(fakeOffline);
}
ChatControllerBase::setEnabled(enabled);
}