PIN: fix and add tests

This commit is contained in:
ganfra 2023-10-25 16:13:30 +02:00
parent 49e2060961
commit adf21e0e02
4 changed files with 135 additions and 24 deletions

View file

@ -57,7 +57,6 @@ class PinUnlockPresenter @Inject constructor(
var showSignOutPrompt by rememberSaveable {
mutableStateOf(false)
}
val signOutAction = remember {
mutableStateOf<Async<String?>>(Async.Uninitialized)
}
@ -92,8 +91,10 @@ class PinUnlockPresenter @Inject constructor(
PinUnlockEvents.OnForgetPin -> showSignOutPrompt = true
PinUnlockEvents.ClearSignOutPrompt -> showSignOutPrompt = false
PinUnlockEvents.SignOut -> {
showSignOutPrompt = false
coroutineScope.signOut(signOutAction)
if (showSignOutPrompt) {
showSignOutPrompt = false
coroutineScope.signOut(signOutAction)
}
}
PinUnlockEvents.OnUseBiometric -> {
//TODO