Don't display password field when autoconfig fails

This commit is contained in:
cketti 2023-11-24 12:14:54 +01:00
parent 1596adc0c5
commit 49801b125d
2 changed files with 4 additions and 1 deletions

View file

@ -16,6 +16,7 @@ interface AccountAutoDiscoveryContract {
EMAIL_ADDRESS,
OAUTH,
PASSWORD,
MANUAL_SETUP,
}
interface ViewModel : UnidirectionalViewModel<State, Event, Effect> {

View file

@ -92,6 +92,7 @@ internal class AccountAutoDiscoveryViewModel(
ConfigStep.PASSWORD -> submitPassword()
ConfigStep.OAUTH -> Unit
ConfigStep.MANUAL_SETUP -> navigateNext(isAutomaticConfig = false)
}
}
@ -142,7 +143,7 @@ internal class AccountAutoDiscoveryViewModel(
it.copy(
isLoading = false,
autoDiscoverySettings = null,
configStep = ConfigStep.PASSWORD,
configStep = ConfigStep.MANUAL_SETUP,
)
}
}
@ -223,6 +224,7 @@ internal class AccountAutoDiscoveryViewModel(
ConfigStep.OAUTH,
ConfigStep.PASSWORD,
ConfigStep.MANUAL_SETUP,
-> updateState {
it.copy(
configStep = ConfigStep.EMAIL_ADDRESS,