parent
a09dd25506
commit
e94cfaec74
|
@ -161,6 +161,9 @@ QtObject:
|
||||||
else:
|
else:
|
||||||
self.communityList.replaceCommunity(community)
|
self.communityList.replaceCommunity(community)
|
||||||
|
|
||||||
|
if (self.activeCommunity.active and self.activeCommunity.communityItem.id == community.id):
|
||||||
|
self.activeCommunity.setCommunityItem(community)
|
||||||
|
|
||||||
if (community.joined == true):
|
if (community.joined == true):
|
||||||
let joinedCommunityCheck = self.joinedCommunityList.getCommunityById(community.id)
|
let joinedCommunityCheck = self.joinedCommunityList.getCommunityById(community.id)
|
||||||
if (joinedCommunityCheck.id == ""):
|
if (joinedCommunityCheck.id == ""):
|
||||||
|
|
|
@ -31,10 +31,13 @@ QtObject:
|
||||||
result.members = newCommunityMembersView(status)
|
result.members = newCommunityMembersView(status)
|
||||||
result.setup
|
result.setup
|
||||||
|
|
||||||
|
proc nbMembersChanged*(self: CommunityItemView) {.signal.}
|
||||||
|
|
||||||
proc setCommunityItem*(self: CommunityItemView, communityItem: Community) =
|
proc setCommunityItem*(self: CommunityItemView, communityItem: Community) =
|
||||||
self.communityItem = communityItem
|
self.communityItem = communityItem
|
||||||
self.chats.setChats(communityItem.chats)
|
self.chats.setChats(communityItem.chats)
|
||||||
self.members.setMembers(communityItem.members)
|
self.members.setMembers(communityItem.members)
|
||||||
|
self.nbMembersChanged()
|
||||||
self.communityMembershipRequestList.setNewData(communityItem.membershipRequests)
|
self.communityMembershipRequestList.setNewData(communityItem.membershipRequests)
|
||||||
|
|
||||||
proc activeChanged*(self: CommunityItemView) {.signal.}
|
proc activeChanged*(self: CommunityItemView) {.signal.}
|
||||||
|
@ -44,7 +47,6 @@ QtObject:
|
||||||
self.status.events.emit("communityActiveChanged", CommunityActiveChangedArgs(active: value))
|
self.status.events.emit("communityActiveChanged", CommunityActiveChangedArgs(active: value))
|
||||||
self.activeChanged()
|
self.activeChanged()
|
||||||
|
|
||||||
proc nbMembersChanged*(self: CommunityItemView) {.signal.}
|
|
||||||
|
|
||||||
proc removeMember*(self: CommunityItemView, pubKey: string) =
|
proc removeMember*(self: CommunityItemView, pubKey: string) =
|
||||||
self.members.removeMember(pubKey)
|
self.members.removeMember(pubKey)
|
||||||
|
|
Loading…
Reference in New Issue