Newly arrives messages sorting

There could be cases where newly arrives message is not added correctly.
It won't necessarily go to the top, that depends on the sort.
This commit is contained in:
mailchuck 2016-01-25 23:52:11 +01:00
parent ce31dacd95
commit 6861dbb147
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -976,9 +976,14 @@ class MyForm(settingsmixin.SMainWindow):
updateUnreadCount(folderItem)
def addMessageListItem(self, tableWidget, items):
sortingEnabled = tableWidget.isSortingEnabled()
if sortingEnabled:
tableWidget.setSortingEnabled(False)
tableWidget.insertRow(0)
for i in range(len(items)):
tableWidget.setItem(0, i, items[i])
if sortingEnabled:
tableWidget.setSortingEnabled(True)
def addMessageListItemSent(self, tableWidget, toAddress, fromAddress, subject, status, ackdata, lastactiontime):
acct = accountClass(fromAddress)