Ubuntu notification fixes

Notification should work irrespective of whether the new message shows
up in the messagelist.
This commit is contained in:
mailchuck 2015-10-31 19:03:10 +01:00
parent a3677e0328
commit 3a4b60bb25
No known key found for this signature in database
GPG Key ID: B6311FA753FBF089

View File

@ -2373,8 +2373,9 @@ class MyForm(QtGui.QMainWindow):
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()
@ -2414,6 +2415,7 @@ class MyForm(QtGui.QMainWindow):
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)