Extracted isDecoupledMethod
This commit is contained in:
parent
9d5826ac3c
commit
b61b1cb5b7
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue