parent
0b0a542828
commit
f3caf589a5
|
@ -144,10 +144,8 @@ Item {
|
||||||
if (joinBtn.access === Constants.communityChatInvitationOnlyAccess || isPendingRequest) {
|
if (joinBtn.access === Constants.communityChatInvitationOnlyAccess || isPendingRequest) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (invitedCommunity.canJoin) {
|
|
||||||
return true
|
return true
|
||||||
}
|
|
||||||
return !invitedCommunity.joined
|
|
||||||
}
|
}
|
||||||
text: {
|
text: {
|
||||||
if (invitedCommunity.ensOnly && !profileModel.profile.ensVerified) {
|
if (invitedCommunity.ensOnly && !profileModel.profile.ensVerified) {
|
||||||
|
@ -157,7 +155,7 @@ Item {
|
||||||
return qsTr("Join")
|
return qsTr("Join")
|
||||||
}
|
}
|
||||||
if (invitedCommunity.joined || invitedCommunity.isMember) {
|
if (invitedCommunity.joined || invitedCommunity.isMember) {
|
||||||
return qsTr("Joined")
|
return qsTr("View")
|
||||||
}
|
}
|
||||||
if (isPendingRequest) {
|
if (isPendingRequest) {
|
||||||
return qsTr("Pending")
|
return qsTr("Pending")
|
||||||
|
@ -173,6 +171,12 @@ Item {
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let error
|
let error
|
||||||
|
|
||||||
|
if (invitedCommunity.joined || invitedCommunity.isMember) {
|
||||||
|
chatsModel.communities.setActiveCommunity(communityId);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (joinBtn.access === Constants.communityChatOnRequestAccess) {
|
if (joinBtn.access === Constants.communityChatOnRequestAccess) {
|
||||||
error = chatsModel.communities.requestToJoinCommunity(communityId,
|
error = chatsModel.communities.requestToJoinCommunity(communityId,
|
||||||
profileModel.profile.ensVerified ? profileModel.profile.username : "")
|
profileModel.profile.ensVerified ? profileModel.profile.username : "")
|
||||||
|
|
Loading…
Reference in New Issue