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 952faad..4182f92 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 @@ -35,7 +35,9 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> val challenge = tanChallengeReceived.tanChallenge - val isNotADecoupledTanMethod = !!!challenge.selectedTanMethod.type.isDecoupledMethod + val isDecoupledMethod = challenge.selectedTanMethod.type.isDecoupledMethod + + val isNotADecoupledTanMethod = !!!isDecoupledMethod var tanImageHeight by remember { mutableStateOf(250) } val minTanImageHeight = 100 @@ -46,7 +48,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> var enteredTan by remember { mutableStateOf("") } - if (!!!isNotADecoupledTanMethod) { + if (isDecoupledMethod) { challenge.addUserApprovedDecoupledTanCallback { onDismiss() } @@ -65,7 +67,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () -> useMoreThanPlatformDefaultWidthOnMobile = true, confirmButtonTitle = if (isNotADecoupledTanMethod) "OK" else "", confirmButtonEnabled = enteredTan.length > 2 && isNotADecoupledTanMethod, - showProgressIndicatorOnConfirmButton = !!!isNotADecoupledTanMethod, + showProgressIndicatorOnConfirmButton = isDecoupledMethod, onConfirm = { confirmCalled() }, onDismiss = { tanChallengeReceived.callback(EnterTanResult(null))