mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-01 12:28:33 +01:00
flattening nested loading state changes to avoid flashing
This commit is contained in:
parent
10be592094
commit
86b87e12d7
@ -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…
Reference in New Issue
Block a user