From db6c39cc4cb250973f1ff478aee2d1203f07b80d Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Mon, 16 Aug 2021 13:17:53 -0400
Subject: [PATCH] chatview: hide the show plugins button for read-only
 conversations

Gitlab: #492
Change-Id: I4f5d0ed77dd8d2b4ed20af37525b9d33e967d649
---
 src/mainview/components/MessageWebViewHeader.qml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mainview/components/MessageWebViewHeader.qml b/src/mainview/components/MessageWebViewHeader.qml
index 722ae8588..d167b5fbf 100644
--- a/src/mainview/components/MessageWebViewHeader.qml
+++ b/src/mainview/components/MessageWebViewHeader.qml
@@ -36,7 +36,7 @@ Rectangle {
     signal needToHideConversationInCall
     signal pluginSelector
 
-    property bool callButtonsVisibility: {
+    property bool interactionButtonsVisibility: {
         if (CurrentConversation.inCall)
             return false
         if (CurrentConversation.isSwarm &&
@@ -142,7 +142,7 @@ Rectangle {
             PushButton {
                 id: startAAudioCallButton
 
-                visible: callButtonsVisibility
+                visible: interactionButtonsVisibility
 
                 anchors.right: startAVideoCallButton.left
                 anchors.rightMargin: 8
@@ -160,7 +160,7 @@ Rectangle {
             PushButton {
                 id: startAVideoCallButton
 
-                visible: callButtonsVisibility
+                visible: interactionButtonsVisibility
 
                 anchors.right: selectPluginButton.visible ? selectPluginButton.left :
                                    sendContactRequestButton.visible ?
@@ -181,7 +181,8 @@ Rectangle {
             PushButton {
                 id: selectPluginButton
 
-                visible: PluginAdapter.chatHandlersListCount
+                visible: PluginAdapter.chatHandlersListCount &&
+                         interactionButtonsVisibility
 
                 anchors.right: sendContactRequestButton.visible ?
                                    sendContactRequestButton.left :
-- 
GitLab