mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Ignore if no change is done.
This commit is contained in:
parent
420144dceb
commit
fb7df5bf46
1 changed files with 6 additions and 1 deletions
|
@ -152,11 +152,16 @@ class UnifiedPushHelper @Inject constructor(
|
||||||
MaterialAlertDialogBuilder(activity)
|
MaterialAlertDialogBuilder(activity)
|
||||||
.setTitle(stringProvider.getString(R.string.unifiedpush_getdistributors_dialog_title))
|
.setTitle(stringProvider.getString(R.string.unifiedpush_getdistributors_dialog_title))
|
||||||
.setItems(distributorsName.toTypedArray()) { _, which ->
|
.setItems(distributorsName.toTypedArray()) { _, which ->
|
||||||
|
val distributor = distributors[which]
|
||||||
|
if (distributor == getCurrentDistributorName()) {
|
||||||
|
Timber.d("Same distributor selected again, no action")
|
||||||
|
return@setItems
|
||||||
|
}
|
||||||
|
|
||||||
if (unregisterFirst) {
|
if (unregisterFirst) {
|
||||||
// Un-register first
|
// Un-register first
|
||||||
unregister(pushersManager)
|
unregister(pushersManager)
|
||||||
}
|
}
|
||||||
val distributor = distributors[which]
|
|
||||||
up.saveDistributor(context, distributor)
|
up.saveDistributor(context, distributor)
|
||||||
Timber.i("Saving distributor: $distributor")
|
Timber.i("Saving distributor: $distributor")
|
||||||
up.registerApp(context)
|
up.registerApp(context)
|
||||||
|
|
Loading…
Reference in a new issue