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 {
|
object FcmHelper {
|
||||||
|
|
||||||
fun isPushSupported(): Boolean = false
|
fun isFirebaseAvailable(): Boolean = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the FCM registration token.
|
* Retrieves the FCM registration token.
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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? {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue