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:
parent
3bde549e5c
commit
89752faceb
|
@ -975,9 +975,14 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
updateUnreadCount(folderItem)
|
updateUnreadCount(folderItem)
|
||||||
|
|
||||||
def addMessageListItem(self, tableWidget, items):
|
def addMessageListItem(self, tableWidget, items):
|
||||||
|
sortingEnabled = tableWidget.isSortingEnabled()
|
||||||
|
if sortingEnabled:
|
||||||
|
tableWidget.setSortingEnabled(False)
|
||||||
tableWidget.insertRow(0)
|
tableWidget.insertRow(0)
|
||||||
for i in range(len(items)):
|
for i in range(len(items)):
|
||||||
tableWidget.setItem(0, i, items[i])
|
tableWidget.setItem(0, i, items[i])
|
||||||
|
if sortingEnabled:
|
||||||
|
tableWidget.setSortingEnabled(True)
|
||||||
|
|
||||||
def addMessageListItemSent(self, tableWidget, toAddress, fromAddress, subject, status, ackdata, lastactiontime):
|
def addMessageListItemSent(self, tableWidget, toAddress, fromAddress, subject, status, ackdata, lastactiontime):
|
||||||
acct = accountClass(fromAddress)
|
acct = accountClass(fromAddress)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user