Message list loading performance improvement
- by disabling UI updates (which are not necessary as it freezes anyway), the message list loading is faster
This commit is contained in:
parent
47e2df86b9
commit
9dd09a44fc
|
@ -1091,6 +1091,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
tableWidget.setColumnHidden(1, True)
|
tableWidget.setColumnHidden(1, True)
|
||||||
xAddress = 'fromaddress'
|
xAddress = 'fromaddress'
|
||||||
|
|
||||||
|
tableWidget.setUpdatesEnabled(False)
|
||||||
tableWidget.setSortingEnabled(False)
|
tableWidget.setSortingEnabled(False)
|
||||||
tableWidget.setRowCount(0)
|
tableWidget.setRowCount(0)
|
||||||
queryreturn = helper_search.search_sql(xAddress, account, "sent", where, what, False)
|
queryreturn = helper_search.search_sql(xAddress, account, "sent", where, what, False)
|
||||||
|
@ -1102,6 +1103,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
tableWidget.setSortingEnabled(False)
|
tableWidget.setSortingEnabled(False)
|
||||||
tableWidget.horizontalHeader().setSortIndicator(3, Qt.DescendingOrder)
|
tableWidget.horizontalHeader().setSortIndicator(3, Qt.DescendingOrder)
|
||||||
tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Sent", None))
|
tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Sent", None))
|
||||||
|
tableWidget.setUpdatesEnabled(True)
|
||||||
|
|
||||||
# Load messages from database file
|
# Load messages from database file
|
||||||
def loadMessagelist(self, tableWidget, account, folder="inbox", where="", what="", unreadOnly = False):
|
def loadMessagelist(self, tableWidget, account, folder="inbox", where="", what="", unreadOnly = False):
|
||||||
|
@ -1120,6 +1122,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
tableWidget.setColumnHidden(0, False)
|
tableWidget.setColumnHidden(0, False)
|
||||||
tableWidget.setColumnHidden(1, False)
|
tableWidget.setColumnHidden(1, False)
|
||||||
|
|
||||||
|
tableWidget.setUpdatesEnabled(False)
|
||||||
tableWidget.setSortingEnabled(False)
|
tableWidget.setSortingEnabled(False)
|
||||||
tableWidget.setRowCount(0)
|
tableWidget.setRowCount(0)
|
||||||
|
|
||||||
|
@ -1133,6 +1136,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
tableWidget.setSortingEnabled(True)
|
tableWidget.setSortingEnabled(True)
|
||||||
tableWidget.selectRow(0)
|
tableWidget.selectRow(0)
|
||||||
tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Received", None))
|
tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Received", None))
|
||||||
|
tableWidget.setUpdatesEnabled(True)
|
||||||
|
|
||||||
# create application indicator
|
# create application indicator
|
||||||
def appIndicatorInit(self, app):
|
def appIndicatorInit(self, app):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user