summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-12 11:51:09 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-12 11:51:09 (GMT)
commit5de579953a2e87afd7f4c56962c68f18ab3888aa (patch)
treed075b02845066663a219e91e6c3854998ed54daf /Swift
parent216a1b17c9e269e379c33f61c8cbc7acb7854b74 (diff)
downloadswift-5de579953a2e87afd7f4c56962c68f18ab3888aa.zip
swift-5de579953a2e87afd7f4c56962c68f18ab3888aa.tar.bz2
Don't update the unread count if it hasn't changed.
Diffstat (limited to 'Swift')
-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) {