From 5de579953a2e87afd7f4c56962c68f18ab3888aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sat, 12 Feb 2011 12:51:09 +0100 Subject: Don't update the unread count if it hasn't changed. 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) { -- cgit v0.10.2-6-g49f6