fix(communities): emit SIGNAL_COMMUNITY_JOINED for new communities

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.
This commit is contained in:
Patryk Osmaczko 2022-10-20 09:15:17 +02:00 committed by osmaczko
parent 8e307d6c35
commit 4b8667d384
1 changed files with 6 additions and 0 deletions

View File

@ -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)):