fix: fix member count not updating when inviting

Fixes #1949
This commit is contained in:
Jonathan Rainville 2021-03-03 15:04:59 -05:00 committed by Iuri Matias
parent a09dd25506
commit e94cfaec74
2 changed files with 6 additions and 1 deletions

View File

@ -161,6 +161,9 @@ QtObject:
else:
self.communityList.replaceCommunity(community)
if (self.activeCommunity.active and self.activeCommunity.communityItem.id == community.id):
self.activeCommunity.setCommunityItem(community)
if (community.joined == true):
let joinedCommunityCheck = self.joinedCommunityList.getCommunityById(community.id)
if (joinedCommunityCheck.id == ""):

View File

@ -31,10 +31,13 @@ QtObject:
result.members = newCommunityMembersView(status)
result.setup
proc nbMembersChanged*(self: CommunityItemView) {.signal.}
proc setCommunityItem*(self: CommunityItemView, communityItem: Community) =
self.communityItem = communityItem
self.chats.setChats(communityItem.chats)
self.members.setMembers(communityItem.members)
self.nbMembersChanged()
self.communityMembershipRequestList.setNewData(communityItem.membershipRequests)
proc activeChanged*(self: CommunityItemView) {.signal.}
@ -44,7 +47,6 @@ QtObject:
self.status.events.emit("communityActiveChanged", CommunityActiveChangedArgs(active: value))
self.activeChanged()
proc nbMembersChanged*(self: CommunityItemView) {.signal.}
proc removeMember*(self: CommunityItemView, pubKey: string) =
self.members.removeMember(pubKey)