mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-25 09:10:53 +01:00
shorter code
This commit is contained in:
parent
639c570150
commit
87087197e5
@ -236,14 +236,11 @@ class UnifiedPushHelper @Inject constructor(
|
||||
}
|
||||
|
||||
fun getCurrentDistributorName(): String {
|
||||
if (isEmbeddedDistributor()) {
|
||||
return stringProvider.getString(R.string.unifiedpush_distributor_fcm_fallback)
|
||||
return when {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user