Skip to content

Commit

Permalink
fix(communities): emit SIGNAL_COMMUNITY_JOINED for new communities
Browse files Browse the repository at this point in the history
New community that appears through community update signal can also
be the community we are already members of, in that case we need
to emit SIGNAL_COMMUNITY_JOINED, so that it appears on the side bar.
  • Loading branch information
osmaczko committed Oct 20, 2022
1 parent 8e307d6 commit 4b8667d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app_service/service/community/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ QtObject:
if(not self.allCommunities.hasKey(community.id)):
self.allCommunities[community.id] = community
self.events.emit(SIGNAL_COMMUNITY_ADDED, CommunityArgs(community: community))

if(not self.joinedCommunities.hasKey(community.id)):
if (community.joined and community.isMember):
self.joinedCommunities[community.id] = community
self.events.emit(SIGNAL_COMMUNITY_JOINED, CommunityArgs(community: community, fromUserAction: false))

return

if(self.curatedCommunities.hasKey(community.id)):
Expand Down

0 comments on commit 4b8667d

Please sign in to comment.