when the keyinfo doesn't contain a passphrase we shouldn't view the passphrase screen

fixed by handling the back case to skip the passphrase screen if we don't have one
This commit is contained in:
Adam Brown 2021-09-29 13:11:19 +01:00
parent 4e15975c6c
commit edce14f48f

View file

@ -76,7 +76,6 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
}
init {
setState {
copy(userId = session.myUserId)
}
@ -167,10 +166,14 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
if (state.checkingSSSSAction is Loading) return@withState // ignore
when (state.step) {
SharedSecureStorageViewState.Step.EnterKey -> {
setState {
copy(
step = SharedSecureStorageViewState.Step.EnterPassphrase
)
if (state.hasPassphrase) {
setState {
copy(
step = SharedSecureStorageViewState.Step.EnterPassphrase
)
}
} else {
_viewEvents.post(SharedSecureStorageViewEvent.Dismiss)
}
}
SharedSecureStorageViewState.Step.ResetAll -> {