From 58dc091536103b8f0e5d8048ce6f9d96c9283f8b 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