diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-04-27 14:58:37 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-04-27 14:58:37 (GMT) |
commit | 9e57b31133edad6a543da05aca54ee94d589b090 (patch) | |
tree | 85b5fa4c4669677a5b4e6d263bbf153077bee357 /Swift/Controllers/Chat/ChatControllerBase.cpp | |
parent | c1944713513ae5262e9960a7ef391f4bb915e999 (diff) | |
download | swift-contrib-9e57b31133edad6a543da05aca54ee94d589b090.zip swift-contrib-9e57b31133edad6a543da05aca54ee94d589b090.tar.bz2 |
Reset state of collapsing presence when a chat window is cleared.
To stop new presence being lost because it's trying to append to old (deleted) data.
Resolves: #925
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 583a102..3ff52a6 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -37,6 +37,7 @@ ChatControllerBase::ChatControllerBase(const JID& self, StanzaChannel* stanzaCha chatWindow_ = chatWindowFactory_->createChatWindow(toJID, eventStream); chatWindow_->onAllMessagesRead.connect(boost::bind(&ChatControllerBase::handleAllMessagesRead, this)); chatWindow_->onSendMessageRequest.connect(boost::bind(&ChatControllerBase::handleSendMessageRequest, this, _1, _2)); + chatWindow_->onLogCleared.connect(boost::bind(&ChatControllerBase::handleLogCleared, this)); entityCapsProvider_->onCapsChanged.connect(boost::bind(&ChatControllerBase::handleCapsChanged, this, _1)); setOnline(stanzaChannel->isAvailable() && iqRouter->isAvailable()); createDayChangeTimer(); @@ -46,6 +47,10 @@ ChatControllerBase::~ChatControllerBase() { delete chatWindow_; } +void ChatControllerBase::handleLogCleared() { + cancelReplaces(); +} + void ChatControllerBase::handleCapsChanged(const JID& jid) { if (jid.compare(toJID_, JID::WithoutResource) == 0) { handleBareJIDCapsChanged(jid); |