diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-07 20:29:10 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-07 20:29:10 (GMT) |
commit | 3ef9dabfc62cb3daf0b88543a5d65d31e8eb5977 (patch) | |
tree | 980de61384d9cb924d130eedb051245f02434776 /Swift/Controllers/Chat/ChatControllerBase.cpp | |
parent | ebda58fd30c7a4aec8f04e3751de869579b71cac (diff) | |
download | swift-contrib-3ef9dabfc62cb3daf0b88543a5d65d31e8eb5977.zip swift-contrib-3ef9dabfc62cb3daf0b88543a5d65d31e8eb5977.tar.bz2 |
Add setUnreadCount to ChatListView
Resolves: #904
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index fcaf4ce..5e3c45f 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -87,6 +87,11 @@ void ChatControllerBase::handleAllMessagesRead() { } unreadMessages_.clear(); chatWindow_->setUnreadMessageCount(0); + onUnreadCountChanged(); +} + +int ChatControllerBase::getUnreadCount() { + return unreadMessages_.size(); } void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool isCorrectionMessage) { @@ -203,6 +208,7 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m } chatWindow_->show(); chatWindow_->setUnreadMessageCount(unreadMessages_.size()); + onUnreadCountChanged(); postHandleIncomingMessage(messageEvent); } |