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 {
fun isPushSupported(): Boolean = false
fun isFirebaseAvailable(): Boolean = false
/**
* Retrieves the FCM registration token.

View file

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

View file

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

View file

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