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