diff options
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
| -rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 8a26a56..3805084 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp | |||
| @@ -118,8 +118,8 @@ void ChatControllerBase::handleAllMessagesRead() { | |||
| 118 | } | 118 | } |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | int ChatControllerBase::getUnreadCount() { | 121 | size_t ChatControllerBase::getUnreadCount() { |
| 122 | return boost::numeric_cast<int>(targetedUnreadMessages_.size()); | 122 | return targetedUnreadMessages_.size(); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool isCorrectionMessage) { | 125 | void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool isCorrectionMessage) { |
| @@ -193,11 +193,10 @@ ChatWindow::ChatMessage ChatControllerBase::buildChatWindowChatMessage(const std | |||
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void ChatControllerBase::updateMessageCount() { | 195 | void ChatControllerBase::updateMessageCount() { |
| 196 | int intCount = boost::numeric_cast<int>(unreadMessages_.size()); | ||
| 197 | chatWindow_->setUnreadMessageCount(intCount); | ||
| 198 | auto baseJID = getBaseJID(); | 196 | auto baseJID = getBaseJID(); |
| 199 | auto state = chattables_.getState(baseJID); | 197 | auto state = chattables_.getState(baseJID); |
| 200 | state.unreadCount = intCount; | 198 | state.unreadCount = unreadMessages_.size(); |
| 199 | chatWindow_->setUnreadMessageCount(state.unreadCount); | ||
| 201 | chattables_.setState(baseJID, state); | 200 | chattables_.setState(baseJID, state); |
| 202 | #ifndef NOT_YET | 201 | #ifndef NOT_YET |
| 203 | onUnreadCountChanged(); | 202 | onUnreadCountChanged(); |
Swift