mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 07:14:37 +00:00
fix: fix channel not updating on new messages
This commit is contained in:
parent
ea89ebd960
commit
64a0710897
@ -322,13 +322,13 @@ QtObject:
|
||||
let channel = self.chats.getChannelById(msg.chatId)
|
||||
if (channel == nil):
|
||||
continue
|
||||
let isAddedContact = channel.chatType.isOneToOne and self.status.contacts.isAdded(channel.id)
|
||||
|
||||
if msg.chatId == self.activeChannel.id:
|
||||
discard self.status.chat.markMessagesSeen(msg.chatId, @[msg.id])
|
||||
self.newMessagePushed()
|
||||
|
||||
if not channel.muted:
|
||||
let isAddedContact = channel.chatType.isOneToOne and self.status.contacts.isAdded(channel.id)
|
||||
self.messageNotificationPushed(
|
||||
msg.chatId,
|
||||
escape_html(msg.text),
|
||||
|
@ -147,8 +147,10 @@ QtObject:
|
||||
let idx = self.upsertChannel(channel)
|
||||
if idx == -1: return
|
||||
|
||||
let topLeft = self.createIndex(0, 0, nil)
|
||||
let bottomRight = self.createIndex(self.chats.len, 0, nil)
|
||||
let topLeft = self.createIndex(idx, 0, nil)
|
||||
let bottomRight = self.createIndex(idx, 0, nil)
|
||||
|
||||
self.chats[idx] = channel
|
||||
|
||||
self.dataChanged(topLeft, bottomRight, @[ChannelsRoles.Name.int, ChannelsRoles.Description.int, ChannelsRoles.ContentType.int, ChannelsRoles.LastMessage.int, ChannelsRoles.Timestamp.int, ChannelsRoles.UnreadMessages.int, ChannelsRoles.Identicon.int, ChannelsRoles.ChatType.int, ChannelsRoles.Color.int, ChannelsRoles.HasMentions.int, ChannelsRoles.Muted.int])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user