summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index c8341dc..62a696e 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -211,9 +211,11 @@ void QtChatWindow::showEvent(QShowEvent* event) {
}
void QtChatWindow::setUnreadMessageCount(int count) {
- unreadCount_ = count;
- updateTitleWithUnreadCount();
- emit countUpdated();
+ if (unreadCount_ != count) {
+ unreadCount_ = count;
+ updateTitleWithUnreadCount();
+ emit countUpdated();
+ }
}
void QtChatWindow::setContactChatState(ChatState::ChatStateType state) {