Skip to content

Commit

Permalink
Ubuntu notification fixes
Browse files Browse the repository at this point in the history
Notification should work irrespective of whether the new message shows
up in the messagelist.
  • Loading branch information
mailchuck committed Oct 31, 2015
1 parent a3677e0 commit 3a4b60b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bitmessageqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2373,8 +2373,9 @@ def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject,
inbox = self.getAccountMessagelist(acct)
treeWidget = self.getAccountTreeWidget(acct)
self.propagateUnreadCount(toAddress)
self.ubuntuMessagingMenuUpdate(True, newItem, acct.toLabel)
if (self.getCurrentFolder(treeWidget) != "inbox" and self.getCurrentFolder(treeWidget) != False) or self.getCurrentAccount(treeWidget) != toAddress:
# Ubuntu should notify of new message irespective of whether it's in current message list or not
self.ubuntuMessagingMenuUpdate(True, None, acct.toLabel)
return

font = QFont()
Expand Down Expand Up @@ -2414,6 +2415,7 @@ def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject,
newItem.setFont(font)
inbox.setItem(0, 3, newItem)
inbox.setSortingEnabled(True)
self.ubuntuMessagingMenuUpdate(True, newItem, acct.toLabel)

def click_pushButtonAddAddressBook(self):
self.AddAddressDialogInstance = AddAddressDialog(self)
Expand Down

0 comments on commit 3a4b60b

Please sign in to comment.