diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt index 13e3d25fe0..b6babfdb0d 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt @@ -49,6 +49,9 @@ data class LoginViewState( || asyncResetPassword is Loading || asyncResetMailConfirmed is Loading || asyncRegistration is Loading + // Keep loading when it is success because of the delay to switch to the next Activity + || asyncLoginAction is Success + } fun isUserLogged(): Boolean { diff --git a/vector/src/main/java/im/vector/riotx/features/signout/SoftLogoutViewState.kt b/vector/src/main/java/im/vector/riotx/features/signout/SoftLogoutViewState.kt index c0c97a1628..9e5a628ec5 100644 --- a/vector/src/main/java/im/vector/riotx/features/signout/SoftLogoutViewState.kt +++ b/vector/src/main/java/im/vector/riotx/features/signout/SoftLogoutViewState.kt @@ -16,10 +16,7 @@ package im.vector.riotx.features.signout -import com.airbnb.mvrx.Async -import com.airbnb.mvrx.Loading -import com.airbnb.mvrx.MvRxState -import com.airbnb.mvrx.Uninitialized +import com.airbnb.mvrx.* import im.vector.riotx.features.login.LoginMode data class SoftLogoutViewState( @@ -35,5 +32,7 @@ data class SoftLogoutViewState( fun isLoading(): Boolean { return asyncLoginAction is Loading + // Keep loading when it is success because of the delay to switch to the next Activity + || asyncLoginAction is Success } }