Change the distributor in dialog cancellation only if there is no existing one

This commit is contained in:
Maxime NATUREL 2022-11-30 11:06:24 +01:00
parent 3f944e9d36
commit 95556d2551

View File

@ -206,8 +206,11 @@ class UnifiedPushHelper @Inject constructor(
onDistributorSelected(distributor)
}
.setOnCancelListener {
// By default, use internal solution (fcm/background sync)
onDistributorSelected(context.packageName)
// we do not want to change the distributor on behalf of the user
if (UnifiedPush.getDistributor(context).isEmpty()) {
// By default, use internal solution (fcm/background sync)
onDistributorSelected(context.packageName)
}
}
.setCancelable(true)
.show()