Properly mark chats as read

develop
knotteye 2021-04-25 17:33:07 -05:00
parent 2ede34c207
commit ac324d0402
1 changed files with 2 additions and 1 deletions

View File

@ -736,7 +736,7 @@ class MessageArea(QWidget):
if not self.last_read_id or not u or not i:
return
acc = ex.accts[u+i]
acc.markChatRead(self.chatID, self.last_read_id)
CallThread(acc.markChatRead, None, self.chatID, self.last_read_id).start()
def addPage(self):
if self.fetchingPage:
@ -756,6 +756,7 @@ class MessageArea(QWidget):
for message in messages:
if message['account_id'] == self.account['id']:
self.last_read_id = message['id']
break
for i in reversed(range(self.layout.count())):
self.layout.itemAt(i).widget().setParent(None)
for message in reversed(messages):