Skip to content

Commit 32f2697

Browse files
committed
notify of new message fixed
Will notify even if not on active messagelist.
1 parent c337f39 commit 32f2697

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bitmessageqt/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,8 @@ def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject,
23542354
inbox = self.getAccountMessagelist(acct)
23552355
treeWidget = self.getAccountTreeWidget(acct)
23562356
self.propagateUnreadCount(acct.address)
2357+
if shared.config.getboolean('bitmessagesettings', 'showtraynotifications'):
2358+
self.notifierShow(unicode(_translate("MainWindow",'New Message').toUtf8(),'utf-8'), unicode(_translate("MainWindow",'From ').toUtf8(),'utf-8') + unicode(acct.fromLabel, 'utf-8'), self.SOUND_UNKNOWN, None)
23572359
if (self.getCurrentFolder(treeWidget) != "inbox" and self.getCurrentFolder(treeWidget) is not None) or self.getCurrentAccount(treeWidget) != acct.address:
23582360
# Ubuntu should notify of new message irespective of whether it's in current message list or not
23592361
self.ubuntuMessagingMenuUpdate(True, None, acct.toLabel)
@@ -2373,8 +2375,6 @@ def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject,
23732375

23742376
newItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8'))
23752377
newItem.setToolTip(unicode(acct.fromLabel, 'utf-8'))
2376-
if shared.config.getboolean('bitmessagesettings', 'showtraynotifications'):
2377-
self.notifierShow(unicode(_translate("MainWindow",'New Message').toUtf8(),'utf-8'), unicode(_translate("MainWindow",'From ').toUtf8(),'utf-8') + unicode(acct.fromLabel, 'utf-8'), self.SOUND_UNKNOWN, None)
23782378
newItem.setData(Qt.UserRole, str(fromAddress))
23792379
newItem.setFont(font)
23802380
newItem.setTextColor(AccountColor(fromAddress).accountColor())

0 commit comments

Comments
 (0)