fixing homeserver edits not updating the selected server UI
This commit is contained in:
parent
abf35d730d
commit
6cd05c899e
|
@ -302,7 +302,9 @@ class OnboardingViewModel @AssistedInject constructor(
|
|||
authenticationDescription = awaitState().selectedAuthenticationState.description
|
||||
?: AuthenticationDescription.Register(AuthenticationDescription.AuthenticationType.Other)
|
||||
)
|
||||
RegistrationActionHandler.Result.StartRegistration -> _viewEvents.post(OnboardingViewEvents.DisplayStartRegistration)
|
||||
RegistrationActionHandler.Result.StartRegistration -> {
|
||||
overrideNextStage?.invoke() ?: _viewEvents.post(OnboardingViewEvents.DisplayStartRegistration)
|
||||
}
|
||||
RegistrationActionHandler.Result.UnsupportedStage -> _viewEvents.post(OnboardingViewEvents.DisplayRegistrationFallback)
|
||||
is RegistrationActionHandler.Result.SendEmailSuccess -> _viewEvents.post(OnboardingViewEvents.OnSendEmailSuccess(it.email))
|
||||
is RegistrationActionHandler.Result.SendMsisdnSuccess -> _viewEvents.post(OnboardingViewEvents.OnSendMsisdnSuccess(it.msisdn.msisdn))
|
||||
|
|
|
@ -630,7 +630,7 @@ class OnboardingViewModelTest {
|
|||
private fun givenCanSuccessfullyUpdateHomeserver(homeserverUrl: String, resultingState: SelectedHomeserverState) {
|
||||
fakeHomeServerConnectionConfigFactory.givenConfigFor(homeserverUrl, A_HOMESERVER_CONFIG)
|
||||
fakeStartAuthenticationFlowUseCase.givenResult(A_HOMESERVER_CONFIG, StartAuthenticationResult(isHomeserverOutdated = false, resultingState))
|
||||
givenRegistrationResultFor(RegisterAction.StartRegistration, ANY_CONTINUING_REGISTRATION_RESULT)
|
||||
givenRegistrationResultFor(RegisterAction.StartRegistration, RegistrationActionHandler.Result.StartRegistration)
|
||||
fakeHomeServerHistoryService.expectUrlToBeAdded(A_HOMESERVER_CONFIG.homeServerUri.toString())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue