Fix login flow (#4813)

* Also clear the data, to let the next screen be able to go back

* Disable the change account provider button when the form is loading the data to prevent double navigation

* Improve OnboardingViewTest, ensure that no Event are emitted.

* OnboardingViewTest: add tests to cover the change.
This commit is contained in:
Benoit Marty 2025-06-04 10:02:58 +02:00 committed by GitHub
parent efdc10e60a
commit 4f8133649c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 69 additions and 3 deletions

View file

@ -81,6 +81,8 @@ fun LoginModeView(
LoginMode.PasswordLogin -> onNeedLoginPassword()
is LoginMode.AccountCreation -> onCreateAccountContinue(loginModeData.url)
}
// Also clear the data, to let the next screen be able to go back
onClearError()
}
AsyncData.Uninitialized -> Unit
}

View file

@ -88,7 +88,7 @@ fun ConfirmAccountProviderView(
TextButton(
text = stringResource(id = R.string.screen_account_provider_change),
onClick = onChange,
enabled = true,
enabled = !isLoading,
modifier = Modifier
.fillMaxWidth()
.testTag(TestTags.loginChangeServer)