mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
shorter code
This commit is contained in:
parent
639c570150
commit
87087197e5
1 changed files with 4 additions and 7 deletions
|
@ -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…
Add table
Reference in a new issue