fix(@desktop/chat): avoid to resend notification on scroll

In order to avoid re-sending notification on scroll, update
the channel joined time to now
This commit is contained in:
Anthony Laibe 2021-08-18 14:14:27 +02:00 committed by Iuri Matias
parent 1ab9b82541
commit b2051ebe87
1 changed files with 2 additions and 0 deletions

View File

@ -228,6 +228,8 @@ QtObject:
let isAddedContact = channel.chatType.isOneToOne and self.isAddedContact(channel.id)
self.messageNotificationPushed(msg.chatId, escape_html(msg.text), msg.contentType.int, channel.chatType.int, msg.timestamp, msg.identicon, msg.userName, msg.hasMention, isAddedContact, channel.name)
self.channelOpenTime[msg.chatId] = now().toTime.toUnix * 1000
proc markMessageAsSent*(self:MessageView, chat: string, messageId: string) =
if self.messageList.contains(chat):
self.messageList[chat].markMessageAsSent(messageId)