From 34b77f862c43f32f7f4014953d3c201ee22eaf27 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 9 Sep 2024 03:15:51 +0200 Subject: [PATCH] Fixed cancelling TAN process on dismissing EnterTanDialog --- .../kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt index 4182f92..717449f 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt @@ -57,6 +57,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> fun confirmCalled() { if (enteredTan.length > 2) { tanChallengeReceived.callback(EnterTanResult(enteredTan)) + onDismiss() } } @@ -69,10 +70,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> confirmButtonEnabled = enteredTan.length > 2 && isNotADecoupledTanMethod, showProgressIndicatorOnConfirmButton = isDecoupledMethod, onConfirm = { confirmCalled() }, - onDismiss = { - tanChallengeReceived.callback(EnterTanResult(null)) - onDismiss() - } + onDismiss = { dismiss() } ) { Column(Modifier.fillMaxWidth()) { Column(Modifier.fillMaxWidth()) {