mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
flattening nested loading state changes to avoid flashing
This commit is contained in:
parent
10be592094
commit
86b87e12d7
1 changed files with 1 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue