From 14da9806e2e9dc1785bd81d478681f863a48dc76 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 25 Jan 2022 16:35:16 +0100 Subject: [PATCH] Put bug report app names in config --- .../java/im/vector/app/features/rageshake/BugReporter.kt | 8 ++++---- vector/src/main/res/values/config.xml | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt b/vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt index 46b2e9a7fe..b62a182fd8 100755 --- a/vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt +++ b/vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt @@ -265,7 +265,7 @@ class BugReporter @Inject constructor( // build the multi part request val builder = BugReporterMultipartBody.Builder() .addFormDataPart("text", text) - .addFormDataPart("app", rageShakeAppNameForReport(reportType)) + .addFormDataPart("app", rageShakeAppNameForReport(context, reportType)) .addFormDataPart("user_agent", Matrix.getInstance(context).getUserAgent()) .addFormDataPart("user_id", userId) .addFormDataPart("can_contact", canContact.toString()) @@ -487,7 +487,7 @@ class BugReporter @Inject constructor( activity.startActivity(BugReportActivity.intent(activity, reportType)) } - private fun rageShakeAppNameForReport(reportType: ReportType): String { + private fun rageShakeAppNameForReport(context: Context, reportType: ReportType): String { // As per https://github.com/matrix-org/rageshake // app: Identifier for the application (eg 'riot-web'). // Should correspond to a mapping configured in the configuration file for github issue reporting to work. @@ -495,10 +495,10 @@ class BugReporter @Inject constructor( return when (reportType) { ReportType.AUTO_UISI_SENDER, ReportType.AUTO_UISI -> { - "element-auto-uisi" + context.getString(R.string.bug_report_auto_uisi_app_name) } else -> { - "riot-android" + context.getString(R.string.bug_report_app_name) } } } diff --git a/vector/src/main/res/values/config.xml b/vector/src/main/res/values/config.xml index a8e80f82ed..8f23c2e1be 100755 --- a/vector/src/main/res/values/config.xml +++ b/vector/src/main/res/values/config.xml @@ -7,6 +7,8 @@ https://matrix.org https://piwik.riot.im https://riot.im/bugreports/submit + riot-android + element-auto-uisi