Registration: annoying error message scares every new user when they add an email (#2391)

This commit is contained in:
Benoit Marty 2020-11-16 10:54:36 +01:00
parent 8dff0b2c5d
commit a056cbd19f
3 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Bugfix 🐛:
- Fix issue when restoring draft after sharing (#2287)
- Fix issue when updating the avatar of a room (new avatar vanishing)
- Discard change dialog displayed by mistake when avatar has been updated
- Registration: annoying error message scares every new user when they add an email (#2391)
Translations 🗣:
-

View File

@ -69,6 +69,11 @@ abstract class AbstractLoginFragment : VectorBaseFragment(), OnBackPressed {
}
override fun showFailure(throwable: Throwable) {
// Only the resumed Fragment can eventually show the error, to avoid multiple dialog display
if (!isResumed) {
return
}
when (throwable) {
is Failure.Cancelled ->
/* Ignore this error, user has cancelled the action */

View File

@ -207,7 +207,6 @@ class LoginViewModel @AssistedInject constructor(
private fun handleCheckIfEmailHasBeenValidated(action: LoginAction.CheckIfEmailHasBeenValidated) {
// We do not want the common progress bar to be displayed, so we do not change asyncRegistration value in the state
currentTask?.cancel()
currentTask = null
currentTask = registrationWizard?.checkIfEmailHasBeenValidated(action.delayMillis, registrationCallback)
}