Small cleanup

This commit is contained in:
Benoit Marty 2022-06-01 16:45:02 +02:00 committed by Benoit Marty
parent 4018113c88
commit fb8408c3da

View File

@ -246,9 +246,8 @@ class UnifiedPushHelper @Inject constructor(
}
fun getExternalDistributors(): List<String> {
val distributors = up.getDistributors(context).toMutableList()
distributors.remove(context.packageName)
return distributors
return up.getDistributors(context)
.filterNot { it == context.packageName }
}
fun getCurrentDistributorName(): String {
@ -268,13 +267,11 @@ class UnifiedPushHelper @Inject constructor(
}
fun isEmbeddedDistributor(): Boolean {
return (up.getDistributor(context) == context.packageName &&
FcmHelper.isPushSupported())
return up.getDistributor(context) == context.packageName && FcmHelper.isPushSupported()
}
fun isBackgroundSync(): Boolean {
return (up.getDistributor(context) == context.packageName &&
!FcmHelper.isPushSupported())
return up.getDistributor(context) == context.packageName && !FcmHelper.isPushSupported()
}
fun getPrivacyFriendlyUpEndpoint(): String? {