From 7e258282a2a83ddc875ac6f0ac7f7e09db724608 Mon Sep 17 00:00:00 2001 From: S1m Date: Mon, 16 Aug 2021 18:01:10 +0200 Subject: [PATCH] Change troubleshoot description if using FCM --- .../settings/troubleshoot/TestNewEndpoint.kt | 20 ++++++++++++++----- vector/src/main/res/values/strings.xml | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt index cb09046628..76e1b7c662 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNewEndpoint.kt @@ -35,12 +35,22 @@ class TestNewEndpoint @Inject constructor(private val context: AppCompatActivity val endpoint = UPHelper.getUpEndpoint(context) - if (!endpoint.isNullOrEmpty()) { - status = TestStatus.SUCCESS - description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_success, endpoint) + if (UPHelper.isEmbeddedDistributor(context)) { + if (!endpoint.isNullOrEmpty()) { + status = TestStatus.SUCCESS + description = stringProvider.getString(R.string.settings_troubleshoot_test_fcm_success, endpoint) + } else { + status = TestStatus.FAILED + description = stringProvider.getString(R.string.settings_troubleshoot_test_fcm_failed) + } } else { - status = TestStatus.FAILED - description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_failed) + if (!endpoint.isNullOrEmpty()) { + status = TestStatus.SUCCESS + description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_success, endpoint) + } else { + status = TestStatus.FAILED + description = stringProvider.getString(R.string.settings_troubleshoot_test_endpoint_failed) + } } } } diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index bd73930f19..409fde1d01 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1132,7 +1132,7 @@ Fix Play Services - Endpoint + Endpoint/FCM Endpoint successfully retrieved:\n%1$s Failed to retrieved Endpoint.