From cf7a93b5bbb4cd33d063a4df4221ab6b1efe09d3 Mon Sep 17 00:00:00 2001
From: SpiritCroc <dev@spiritcroc.de>
Date: Mon, 27 Mar 2023 11:53:58 +0200
Subject: [PATCH] Tweak bug report screen for internal builds

I always get confused by the missing switch, so just disable it instead
of hiding.

Change-Id: I894be7dd9d5e50e793960f16ee8b04df20effc41
---
 .../im/vector/app/features/rageshake/BugReportActivity.kt    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt b/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt
index ddc728605a..e0e0a69fbd 100755
--- a/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt
+++ b/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt
@@ -53,7 +53,8 @@ class BugReportActivity :
                 .allowBack()
         setupViews()
 
-        views.bugReportButtonContactMe.isVisible = !isInternalBuild()
+        // Don't allow toggling this for internal builds... internal testers are well-known and may always be contacted!
+        views.bugReportButtonContactMe.isEnabled = !isInternalBuild()
 
         if (bugReporter.screenshot != null) {
             views.bugReportScreenshotPreview.setImageBitmap(bugReporter.screenshot)
@@ -182,7 +183,7 @@ class BugReportActivity :
                 views.bugReportButtonIncludeScreenshot.isChecked,
                 views.bugReportEditText.text.toString(),
                 state.serverVersion,
-                views.bugReportButtonContactMe.isChecked && views.bugReportButtonContactMe.isVisible,
+                views.bugReportButtonContactMe.isChecked && views.bugReportButtonContactMe.isVisible && views.bugReportButtonContactMe.isEnabled,
                 null,
                 object : BugReporter.IMXBugReportListener {
                     override fun onUploadFailed(reason: String?) {