fix(user-list): fix adding users to user list on new messages
Fixes #4898
This commit is contained in:
parent
87c940e95d
commit
d42a34ff3a
|
@ -62,13 +62,17 @@ method handleCommunityOnlyConnections(self: Controller) =
|
||||||
self.delegate.onChatMembersAdded(membersPubKeys)
|
self.delegate.onChatMembersAdded(membersPubKeys)
|
||||||
|
|
||||||
method init*(self: Controller) =
|
method init*(self: Controller) =
|
||||||
# TODO call this function again if isUsersListAvailable changes
|
|
||||||
if(self.isUsersListAvailable):
|
if(self.isUsersListAvailable):
|
||||||
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
|
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
|
||||||
let args = MessagesLoadedArgs(e)
|
let args = MessagesLoadedArgs(e)
|
||||||
if(self.chatId != args.chatId):
|
if(self.chatId != args.chatId):
|
||||||
return
|
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.delegate.newMessagesLoaded(args.messages)
|
||||||
|
|
||||||
self.events.on(SIGNAL_CONTACT_NICKNAME_CHANGED) do(e: Args):
|
self.events.on(SIGNAL_CONTACT_NICKNAME_CHANGED) do(e: Args):
|
||||||
|
|
|
@ -167,7 +167,8 @@ QtObject:
|
||||||
for msgId in messagesOneRepliedTo:
|
for msgId in messagesOneRepliedTo:
|
||||||
removeMessageWithId(messages, msgId)
|
removeMessageWithId(messages, msgId)
|
||||||
|
|
||||||
let data = MessagesArgs(chatId: chatId,
|
let data = MessagesArgs(
|
||||||
|
chatId: chatId,
|
||||||
chatType: chatType,
|
chatType: chatType,
|
||||||
unviewedMessagesCount: unviewedMessagesCount,
|
unviewedMessagesCount: unviewedMessagesCount,
|
||||||
unviewedMentionsCount: unviewedMentionsCount,
|
unviewedMentionsCount: unviewedMentionsCount,
|
||||||
|
|
Loading…
Reference in New Issue