Messagelist subscription color

Fixes Bitmessage#842
This commit is contained in:
mailchuck 2016-01-23 10:14:12 +01:00 committed by Peter Surda
parent 484bdb0782
commit a4c48228fc
3 changed files with 5 additions and 1 deletions

View File

@ -1040,7 +1040,7 @@ class MyForm(settingsmixin.SMainWindow):
def addMessageListItemInbox(self, tableWidget, msgfolder, msgid, toAddress, fromAddress, subject, received, read):
font = QFont()
font.setBold(True)
if tableWidget == self.ui.tableWidgetInboxSubscriptions:
if toAddress == str_broadcast_subscribers:
acct = accountClass(fromAddress)
else:
acct = accountClass(toAddress)

View File

@ -40,6 +40,7 @@ def getSortedSubscriptions(count = False):
def accountClass(address):
if not shared.config.has_section(address):
# FIXME: This BROADCAST section makes no sense
if address == str_broadcast_subscribers:
subscription = BroadcastAccount(address)
if subscription.type != AccountMixin.BROADCAST:

View File

@ -69,6 +69,9 @@ class AccountMixin (object):
self.type = self.CHAN
elif shared.safeConfigGetBoolean(self.address, 'mailinglist'):
self.type = self.MAILINGLIST
elif sqlQuery(
'''select label from subscriptions where address=?''', self.address):
self.type = AccountMixin.SUBSCRIPTION
else:
self.type = self.NORMAL