From 35c63418e2e69f60672bee2a48329c237834e216 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 20 Apr 2021 17:54:33 +0200 Subject: [PATCH] fix(Communities): remove context menu option to leave channel Community channels can't be left, only muted. Closes #2273 --- ui/app/AppLayouts/Chat/components/ChannelContextMenu.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/components/ChannelContextMenu.qml b/ui/app/AppLayouts/Chat/components/ChannelContextMenu.qml index c1e9af2662..04baa42c18 100644 --- a/ui/app/AppLayouts/Chat/components/ChannelContextMenu.qml +++ b/ui/app/AppLayouts/Chat/components/ChannelContextMenu.qml @@ -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 } }