From b2051ebe87deca8e823f2354a652443ccfb8394f Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 18 Aug 2021 14:14:27 +0200 Subject: [PATCH] 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 --- src/app/chat/views/messages.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/chat/views/messages.nim b/src/app/chat/views/messages.nim index 3806ea75c7..d403149c2c 100644 --- a/src/app/chat/views/messages.nim +++ b/src/app/chat/views/messages.nim @@ -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)