fix(Communities): remove context menu option to leave channel

Community channels can't be left, only muted.

Closes #2273
This commit is contained in:
Pascal Precht 2021-04-20 17:54:33 +02:00 committed by Iuri Matias
parent dcb0f4dce9
commit 35c63418e2
1 changed files with 5 additions and 1 deletions

View File

@ -107,9 +107,12 @@ PopupMenu {
onTriggered: chatsModel.clearChatHistoryByIndex(channelContextMenu.channelIndex)
}
Separator {}
Separator {
visible: deleteAction.enabled
}
Action {
id: deleteAction
text: {
if (channelContextMenu.contextChannel.chatType === Constants.chatTypeOneToOne) {
//% "Delete chat"
@ -131,6 +134,7 @@ PopupMenu {
icon.width: 16
icon.height: 16
onTriggered: chatsModel.leaveChatByIndex(channelContextMenu.channelIndex)
enabled: !chatsModel.communities.activeCommunity.active
}
}