avoiding showing the loading when the last screen is not a transition into the main app
This commit is contained in:
parent
023b32367b
commit
3a961e0803
@ -73,7 +73,7 @@ data class OnboardingViewState(
|
|||||||
asyncRegistration is Loading
|
asyncRegistration is Loading
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isUserLogged(): Boolean {
|
fun isAuthTaskCompleted(): Boolean {
|
||||||
return asyncLoginAction is Success
|
return asyncLoginAction is Success
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,8 +229,12 @@ class FtueAuthVariant(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun updateWithState(viewState: OnboardingViewState) {
|
private fun updateWithState(viewState: OnboardingViewState) {
|
||||||
// Loading
|
views.loginLoading.isVisible = if (vectorFeatures.isOnboardingPersonalizeEnabled()) {
|
||||||
views.loginLoading.isVisible = viewState.isLoading()
|
viewState.isLoading()
|
||||||
|
} else {
|
||||||
|
// Keep loading when during success because of the delay when switching to the next Activity
|
||||||
|
viewState.isLoading() || viewState.isAuthTaskCompleted()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onWebLoginError(onWebLoginError: OnboardingViewEvents.OnWebLoginError) {
|
private fun onWebLoginError(onWebLoginError: OnboardingViewEvents.OnWebLoginError) {
|
||||||
|
Loading…
Reference in New Issue
Block a user