Rename method for clarity

This commit is contained in:
Benoit Marty 2022-06-08 12:20:04 +02:00 committed by Benoit Marty
parent a139756dbc
commit 905934b9d4
4 changed files with 6 additions and 6 deletions

View file

@ -31,7 +31,7 @@ import im.vector.app.features.settings.VectorPreferences
*/ */
object FcmHelper { object FcmHelper {
fun isPushSupported(): Boolean = false fun isFirebaseAvailable(): Boolean = false
/** /**
* Retrieves the FCM registration token. * Retrieves the FCM registration token.

View file

@ -37,7 +37,7 @@ import timber.log.Timber
object FcmHelper { object FcmHelper {
private val PREFS_KEY_FCM_TOKEN = "FCM_TOKEN" private val PREFS_KEY_FCM_TOKEN = "FCM_TOKEN"
fun isPushSupported(): Boolean = true fun isFirebaseAvailable(): Boolean = true
/** /**
* Retrieves the FCM registration token. * Retrieves the FCM registration token.

View file

@ -132,7 +132,7 @@ class UnifiedPushHelper @Inject constructor(
cancellable: Boolean, cancellable: Boolean,
) { ) {
val internalDistributorName = stringProvider.getString( val internalDistributorName = stringProvider.getString(
if (FcmHelper.isPushSupported()) { if (FcmHelper.isFirebaseAvailable()) {
R.string.unifiedpush_distributor_fcm_fallback R.string.unifiedpush_distributor_fcm_fallback
} else { } else {
R.string.unifiedpush_distributor_background_sync R.string.unifiedpush_distributor_background_sync
@ -244,11 +244,11 @@ class UnifiedPushHelper @Inject constructor(
} }
fun isEmbeddedDistributor(): Boolean { fun isEmbeddedDistributor(): Boolean {
return up.getDistributor(context) == context.packageName && FcmHelper.isPushSupported() return up.getDistributor(context) == context.packageName && FcmHelper.isFirebaseAvailable()
} }
fun isBackgroundSync(): Boolean { fun isBackgroundSync(): Boolean {
return up.getDistributor(context) == context.packageName && !FcmHelper.isPushSupported() return up.getDistributor(context) == context.packageName && !FcmHelper.isFirebaseAvailable()
} }
fun getPrivacyFriendlyUpEndpoint(): String? { fun getPrivacyFriendlyUpEndpoint(): String? {

View file

@ -33,7 +33,7 @@ class TestAvailableUnifiedPushDistributors @Inject constructor(
val distributors = unifiedPushHelper.getExternalDistributors() val distributors = unifiedPushHelper.getExternalDistributors()
description = if (distributors.isEmpty()) { description = if (distributors.isEmpty()) {
stringProvider.getString( stringProvider.getString(
if (FcmHelper.isPushSupported()) { if (FcmHelper.isFirebaseAvailable()) {
R.string.settings_troubleshoot_test_distributors_gplay R.string.settings_troubleshoot_test_distributors_gplay
} else { } else {
R.string.settings_troubleshoot_test_distributors_fdroid R.string.settings_troubleshoot_test_distributors_fdroid