fix: fix invite button not setting Joined correctly

Fixes #2209
This commit is contained in:
Jonathan Rainville 2021-04-09 12:01:54 -04:00 committed by Iuri Matias
parent 8607251a6e
commit 63b5c549b9
2 changed files with 5 additions and 2 deletions

View File

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

View File

@ -141,9 +141,9 @@ Item {
anchors.top: sep2.bottom
width: parent.width
height: 44
enabled: !invitedCommunity.joined
enabled: !invitedCommunity.joined && !root.joined
//% "Joined"
text: root.joined || invitedCommunity.joined ? qsTrId("joined") :
text: root.joined || invitedCommunity.joined || invitedCommunity.isMember ? qsTrId("joined") :
//% "Join"
qsTrId("join")
onClicked: {