diff --git a/src/app/modules/main/chat_section/chat_content/users/controller.nim b/src/app/modules/main/chat_section/chat_content/users/controller.nim index d171d6feed..065d9df959 100644 --- a/src/app/modules/main/chat_section/chat_content/users/controller.nim +++ b/src/app/modules/main/chat_section/chat_content/users/controller.nim @@ -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): diff --git a/src/app_service/service/message/service.nim b/src/app_service/service/message/service.nim index 4b4a5cce32..080dad3169 100644 --- a/src/app_service/service/message/service.nim +++ b/src/app_service/service/message/service.nim @@ -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,