From b4a209e17c4273c7ae56d8c8600e704b47c3f3fe Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 7 Sep 2021 13:34:52 -0400 Subject: [PATCH] fix: membership requests dissapearing on a community update Fixes #3315 --- src/app/chat/views/communities.nim | 2 ++ src/app/chat/views/community_item.nim | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/chat/views/communities.nim b/src/app/chat/views/communities.nim index b9e41f6cab..a659fd13af 100644 --- a/src/app/chat/views/communities.nim +++ b/src/app/chat/views/communities.nim @@ -253,6 +253,8 @@ QtObject: self.joinedCommunityList.replaceCommunity(community) self.joinedCommunitiesChanged() + # Fetch latest requests for community + self.addMembershipRequests(self.pendingRequestsToJoinForCommunity(community.id)) if (community.isMember == true): var i = 0 for communityRequest in self.myCommunityRequests: diff --git a/src/app/chat/views/community_item.nim b/src/app/chat/views/community_item.nim index b1fc79a187..c79aa1c7ae 100644 --- a/src/app/chat/views/community_item.nim +++ b/src/app/chat/views/community_item.nim @@ -43,8 +43,9 @@ QtObject: self.chats.setChats(communityItem.chats) self.categories.setCategories(communityItem.categories) self.members.setCommunity(communityItem) - self.nbMembersChanged() self.communityMembershipRequestList.setNewData(communityItem.membershipRequests) + self.nbMembersChanged() + proc activeChanged*(self: CommunityItemView) {.signal.}