mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-25 17:12:38 +01:00
shorter code
This commit is contained in:
parent
639c570150
commit
87087197e5
@ -236,14 +236,11 @@ class UnifiedPushHelper @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getCurrentDistributorName(): String {
|
fun getCurrentDistributorName(): String {
|
||||||
if (isEmbeddedDistributor()) {
|
return when {
|
||||||
return stringProvider.getString(R.string.unifiedpush_distributor_fcm_fallback)
|
isEmbeddedDistributor() -> stringProvider.getString(R.string.unifiedpush_distributor_fcm_fallback)
|
||||||
|
isBackgroundSync() -> stringProvider.getString(R.string.unifiedpush_distributor_background_sync)
|
||||||
|
else -> context.getApplicationLabel(up.getDistributor(context))
|
||||||
}
|
}
|
||||||
if (isBackgroundSync()) {
|
|
||||||
return stringProvider.getString(R.string.unifiedpush_distributor_background_sync)
|
|
||||||
}
|
|
||||||
val distributor = up.getDistributor(context)
|
|
||||||
return context.getApplicationLabel(distributor)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isEmbeddedDistributor(): Boolean {
|
fun isEmbeddedDistributor(): Boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user