Change troubleshoot description if using FCM

This commit is contained in:
S1m 2021-08-16 18:01:10 +02:00
parent c584fa60dd
commit 7e258282a2
2 changed files with 16 additions and 6 deletions

View File

@ -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)
}
}
}
}

View File

@ -1132,7 +1132,7 @@
<string name="settings_troubleshoot_test_play_services_quickfix">Fix Play Services</string>
<!-- Unifiedpush Endpoint -->
<string name="settings_troubleshoot_test_endpoint_title">Endpoint</string>
<string name="settings_troubleshoot_test_endpoint_title">Endpoint/FCM</string>
<string name="settings_troubleshoot_test_endpoint_success">Endpoint successfully retrieved:\n%1$s</string>
<string name="settings_troubleshoot_test_endpoint_failed">Failed to retrieved Endpoint.</string>