diff --git a/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt index 5927e5b117..90be21b6be 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt @@ -73,6 +73,9 @@ abstract class AbstractLoginFragment : VectorBaseFragment(), OnBackPressed { override fun showFailure(throwable: Throwable) { when (throwable) { + is Failure.Cancelled -> + /* Ignore this error, user has cancelled the action */ + Unit is Failure.ServerError -> if (throwable.error.code == MatrixError.M_FORBIDDEN && throwable.httpCode == HttpsURLConnection.HTTP_FORBIDDEN /* 403 */) { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt index 47736ec047..b7db9fd229 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt @@ -436,7 +436,6 @@ class LoginViewModel @AssistedInject constructor( } override fun onFailure(failure: Throwable) { - // TODO Handled JobCancellationException setState { copy( asyncResetPassword = Fail(failure) @@ -478,7 +477,6 @@ class LoginViewModel @AssistedInject constructor( } override fun onFailure(failure: Throwable) { - // TODO Handled JobCancellationException setState { copy( asyncResetMailConfirmed = Fail(failure) @@ -593,7 +591,6 @@ class LoginViewModel @AssistedInject constructor( } override fun onFailure(failure: Throwable) { - // TODO Handled JobCancellationException setState { copy( asyncLoginAction = Fail(failure)