From 2d853b0bb467df8ad13759f0b27d5deb81f63d2f Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 14 Jul 2026 15:41:55 -0400 Subject: [PATCH] fix(community): fix issue where chat messages loaded forever MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was an issue where when you spectate a community for the first time, the fetched messages would be impossible to view sometimes because the loading never went away. The problem was that when a community is discovered/spectated, it was immediately calling message initialization for every new chat before that chat’s content module had loaded. But the messages module only subscribes when the chat content is actually loaded in module.nim:75, with the messages submodule starting at module.nim:102. That means the first fetch could be “consumed” early, populate service-side state, and then the first real channel open would see no messages. After app restart, that in-memory state is gone, so the channel looks fine again. --- src/app_service/service/community/service.nim | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index 9cf3b2f2fd..23b439fe5d 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -1167,7 +1167,6 @@ QtObject: chatDto.id = fullChatId # TODO find a way to populate missing infos like the color self.chatService.updateOrAddChat(chatDto) - self.messageService.asyncLoadInitialMessagesForChat(fullChatId) self.events.emit(SIGNAL_COMMUNITIES_UPDATE, CommunitiesArgs(communities: @[updatedCommunity])) self.events.emit(SIGNAL_COMMUNITY_SPECTATED, CommunityArgs(community: updatedCommunity, fromUserAction: true, isPendingOwnershipRequest: (ownerTokenNotification != nil)))