chore(Communities): remove community context menu for non-admins

Normal members shouldn't be able to create channels, nor should "leave
channel" be an option of the context menu provided inside of a community.

This commit removes these.
This commit is contained in:
Pascal Precht 2021-04-20 11:13:36 +02:00 committed by Iuri Matias
parent 6de717e0e4
commit 122b3b8ae9
1 changed files with 1 additions and 10 deletions

View File

@ -54,6 +54,7 @@ Rectangle {
anchors.rightMargin: Style.current.bigPadding
anchors.top: parent.top
anchors.topMargin: 8
visible: chatsModel.communities.activeCommunity.admin
onClicked: {
optionsBtn.state = "pressed"
@ -85,16 +86,6 @@ Rectangle {
onTriggered: openPopup(inviteFriendsToCommunityPopup, {communityId: chatsModel.communities.activeCommunity.id})
}
Action {
//% "Leave community"
text: qsTrId("leave-community")
icon.source: "../../img/delete.svg"
icon.color: Style.current.red
icon.width: 20
icon.height: 20
onTriggered: chatsModel.communities.leaveCurrentCommunity()
}
onAboutToHide: {
optionsBtn.state = "default"
}