From 185d212cb2f0333038d9b63a975d36f7fb2c38d4 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sun, 24 Jan 2016 21:26:42 +0100 Subject: [PATCH] Unread count refresh on change --- src/bitmessageqt/foldertree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index 5fa935ea..b9112b49 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -46,7 +46,11 @@ class AccountMixin (object): self.address = str(address) def setUnreadCount(self, cnt): + if hasattr(self, "unreadCount") and self.unreadCount == int(cnt): + return self.unreadCount = int(cnt) + if isinstance(self, QtGui.QTreeWidgetItem): + self.emitDataChanged() def setEnabled(self, enabled): self.isEnabled = enabled