fix(user-list): fix adding users to user list on new messages

Fixes #4898
This commit is contained in:
Jonathan Rainville 2022-02-28 16:08:40 -05:00
parent 87c940e95d
commit d42a34ff3a
2 changed files with 7 additions and 2 deletions

View File

@ -62,13 +62,17 @@ method handleCommunityOnlyConnections(self: Controller) =
self.delegate.onChatMembersAdded(membersPubKeys)
method init*(self: Controller) =
# TODO call this function again if isUsersListAvailable changes
if(self.isUsersListAvailable):
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
let args = MessagesLoadedArgs(e)
if(self.chatId != args.chatId):
return
self.delegate.newMessagesLoaded(args.messages)
self.events.on(SIGNAL_NEW_MESSAGE_RECEIVED) do(e:Args):
let args = MessagesArgs(e)
if(self.chatId != args.chatId):
return
self.delegate.newMessagesLoaded(args.messages)
self.events.on(SIGNAL_CONTACT_NICKNAME_CHANGED) do(e: Args):

View File

@ -167,7 +167,8 @@ QtObject:
for msgId in messagesOneRepliedTo:
removeMessageWithId(messages, msgId)
let data = MessagesArgs(chatId: chatId,
let data = MessagesArgs(
chatId: chatId,
chatType: chatType,
unviewedMessagesCount: unviewedMessagesCount,
unviewedMentionsCount: unviewedMentionsCount,