flattening nested loading state changes to avoid flashing

This commit is contained in:
Adam Brown 2022-04-13 17:27:04 +01:00
parent 10be592094
commit 86b87e12d7
1 changed files with 1 additions and 2 deletions

View File

@ -615,10 +615,10 @@ class OnboardingViewModel @AssistedInject constructor(
onAuthenticationStartedSuccess(homeServerConnectionConfig, it, serverTypeOverride)
},
onFailure = {
setState { copy(isLoading = false) }
_viewEvents.post(OnboardingViewEvents.Failure(it))
}
)
setState { copy(isLoading = false) }
}
}
@ -632,7 +632,6 @@ class OnboardingViewModel @AssistedInject constructor(
copy(
serverType = alignServerTypeAfterSubmission(config, serverTypeOverride),
selectedHomeserver = authResult.selectedHomeserver,
isLoading = false
)
}
val state = awaitState()