From 5e66131a26fac40b4d8bbe4af20bc5f9c89d434d Mon Sep 17 00:00:00 2001 From: Fabian Bender Date: Fri, 15 Aug 2025 09:25:24 +0200 Subject: [PATCH] switch to oneshot click listener --- CHANGELOG.md | 1 + .../ui/checkout/routingtargets/RoutingTargetGatekeeperView.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e23a50c4f4..32c85dbda3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ### Changed ### Removed ui: Remove ProductConfirmationDialog (APPS-2411) +ui: Fix multiple cancellation events in RoutingTargetGateKeeperView (APPS-2441) ### Fixed ## [0.80.17] diff --git a/ui/src/main/java/io/snabble/sdk/ui/checkout/routingtargets/RoutingTargetGatekeeperView.kt b/ui/src/main/java/io/snabble/sdk/ui/checkout/routingtargets/RoutingTargetGatekeeperView.kt index 23a6c49a90..38df139cb6 100644 --- a/ui/src/main/java/io/snabble/sdk/ui/checkout/routingtargets/RoutingTargetGatekeeperView.kt +++ b/ui/src/main/java/io/snabble/sdk/ui/checkout/routingtargets/RoutingTargetGatekeeperView.kt @@ -20,6 +20,7 @@ import io.snabble.sdk.ui.scanner.BarcodeView import io.snabble.sdk.ui.utils.I18nUtils import io.snabble.sdk.ui.utils.UIUtils import io.snabble.sdk.ui.utils.observeView +import io.snabble.sdk.ui.utils.setOneShotClickListener import io.snabble.sdk.ui.utils.setTextOrHide import io.snabble.sdk.utils.Logger import kotlin.math.roundToInt @@ -57,7 +58,7 @@ class RoutingTargetGatekeeperView @JvmOverloads constructor( helperImage = findViewById(R.id.helper_image) upArrow = findViewById(R.id.arrow) - cancel.setOnClickListener { + cancel.setOneShotClickListener { abort() }