Fixed cancelling TAN process on dismissing EnterTanDialog

This commit is contained in:
dankito 2024-09-09 03:15:51 +02:00
parent 335c5923d6
commit 34b77f862c
1 changed files with 2 additions and 4 deletions

View File

@ -57,6 +57,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
fun confirmCalled() { fun confirmCalled() {
if (enteredTan.length > 2) { if (enteredTan.length > 2) {
tanChallengeReceived.callback(EnterTanResult(enteredTan)) tanChallengeReceived.callback(EnterTanResult(enteredTan))
onDismiss() onDismiss()
} }
} }
@ -69,10 +70,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
confirmButtonEnabled = enteredTan.length > 2 && isNotADecoupledTanMethod, confirmButtonEnabled = enteredTan.length > 2 && isNotADecoupledTanMethod,
showProgressIndicatorOnConfirmButton = isDecoupledMethod, showProgressIndicatorOnConfirmButton = isDecoupledMethod,
onConfirm = { confirmCalled() }, onConfirm = { confirmCalled() },
onDismiss = { onDismiss = { dismiss() }
tanChallengeReceived.callback(EnterTanResult(null))
onDismiss()
}
) { ) {
Column(Modifier.fillMaxWidth()) { Column(Modifier.fillMaxWidth()) {
Column(Modifier.fillMaxWidth()) { Column(Modifier.fillMaxWidth()) {