Properly mark chats as read
parent
2ede34c207
commit
ac324d0402
|
@ -736,7 +736,7 @@ class MessageArea(QWidget):
|
||||||
if not self.last_read_id or not u or not i:
|
if not self.last_read_id or not u or not i:
|
||||||
return
|
return
|
||||||
acc = ex.accts[u+i]
|
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):
|
def addPage(self):
|
||||||
if self.fetchingPage:
|
if self.fetchingPage:
|
||||||
|
@ -756,6 +756,7 @@ class MessageArea(QWidget):
|
||||||
for message in messages:
|
for message in messages:
|
||||||
if message['account_id'] == self.account['id']:
|
if message['account_id'] == self.account['id']:
|
||||||
self.last_read_id = message['id']
|
self.last_read_id = message['id']
|
||||||
|
break
|
||||||
for i in reversed(range(self.layout.count())):
|
for i in reversed(range(self.layout.count())):
|
||||||
self.layout.itemAt(i).widget().setParent(None)
|
self.layout.itemAt(i).widget().setParent(None)
|
||||||
for message in reversed(messages):
|
for message in reversed(messages):
|
||||||
|
|
Loading…
Reference in New Issue