mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-03 04:27:35 +01:00
Hide "can contact me" button for internal builds
Change-Id: I0002c43ff5223270a658320d1aafbd275358a30a
This commit is contained in:
parent
088657168f
commit
d74b8b76e8
@ -50,6 +50,8 @@ class BugReportActivity : VectorBaseActivity<ActivityBugReportBinding>() {
|
||||
.allowBack()
|
||||
setupViews()
|
||||
|
||||
views.bugReportButtonContactMe.isVisible = !isInternalBuild()
|
||||
|
||||
if (bugReporter.screenshot != null) {
|
||||
views.bugReportScreenshotPreview.setImageBitmap(bugReporter.screenshot)
|
||||
} else {
|
||||
@ -132,8 +134,10 @@ class BugReportActivity : VectorBaseActivity<ActivityBugReportBinding>() {
|
||||
return super.onPrepareOptionsMenu(menu)
|
||||
}
|
||||
|
||||
private fun isInternalBuild(): Boolean = BuildConfig.DEBUG || BuildConfig.GIT_BRANCH_NAME == "sm_fdroid"
|
||||
|
||||
private fun minBugReportLength(): Int {
|
||||
return if (BuildConfig.DEBUG || BuildConfig.GIT_BRANCH_NAME == "sm_fdroid") {
|
||||
return if (isInternalBuild()) {
|
||||
2
|
||||
} else {
|
||||
10
|
||||
@ -177,7 +181,7 @@ class BugReportActivity : VectorBaseActivity<ActivityBugReportBinding>() {
|
||||
views.bugReportButtonIncludeScreenshot.isChecked,
|
||||
views.bugReportEditText.text.toString(),
|
||||
state.serverVersion,
|
||||
views.bugReportButtonContactMe.isChecked,
|
||||
views.bugReportButtonContactMe.isChecked && views.bugReportButtonContactMe.isVisible,
|
||||
null,
|
||||
object : BugReporter.IMXBugReportListener {
|
||||
override fun onUploadFailed(reason: String?) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user