Sent folder in chans extended
Previously, it only showed message sent to the selected chan address. Now it shows both those sent to and sent from the chan address. Fixes #181
This commit is contained in:
parent
5cb1fbb7b6
commit
4b091ccaf8
|
@ -1105,10 +1105,14 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
# Load Sent items from database
|
# Load Sent items from database
|
||||||
def loadSent(self, tableWidget, account, where="", what=""):
|
def loadSent(self, tableWidget, account, where="", what=""):
|
||||||
if tableWidget == self.ui.tableWidgetInboxChans or tableWidget == self.ui.tableWidgetInboxSubscriptions:
|
if tableWidget == self.ui.tableWidgetInboxSubscriptions:
|
||||||
tableWidget.setColumnHidden(0, True)
|
tableWidget.setColumnHidden(0, True)
|
||||||
tableWidget.setColumnHidden(1, False)
|
tableWidget.setColumnHidden(1, False)
|
||||||
xAddress = 'toaddress'
|
xAddress = 'toaddress'
|
||||||
|
elif tableWidget == self.ui.tableWidgetInboxChans:
|
||||||
|
tableWidget.setColumnHidden(0, False)
|
||||||
|
tableWidget.setColumnHidden(1, True)
|
||||||
|
xAddress = 'both'
|
||||||
else:
|
else:
|
||||||
tableWidget.setColumnHidden(0, False)
|
tableWidget.setColumnHidden(0, False)
|
||||||
tableWidget.setColumnHidden(1, True)
|
tableWidget.setColumnHidden(1, True)
|
||||||
|
|
|
@ -41,8 +41,13 @@ def search_sql(xAddress = "toaddress", account = None, folder = "inbox", where =
|
||||||
sqlStatementParts = []
|
sqlStatementParts = []
|
||||||
sqlArguments = []
|
sqlArguments = []
|
||||||
if account is not None:
|
if account is not None:
|
||||||
sqlStatementParts.append(xAddress + " = ? ")
|
if xAddress == 'both':
|
||||||
sqlArguments.append(account)
|
sqlStatementParts.append("(fromaddress = ? OR toaddress = ?)")
|
||||||
|
sqlArguments.append(account)
|
||||||
|
sqlArguments.append(account)
|
||||||
|
else:
|
||||||
|
sqlStatementParts.append(xAddress + " = ? ")
|
||||||
|
sqlArguments.append(account)
|
||||||
if folder is not None:
|
if folder is not None:
|
||||||
if folder == "new":
|
if folder == "new":
|
||||||
folder = "inbox"
|
folder = "inbox"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user