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 58a3ea8b1f
commit cb9c6776e1
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)