mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Rename method for clarity
This commit is contained in:
parent
a139756dbc
commit
905934b9d4
4 changed files with 6 additions and 6 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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? {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue