mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Merge pull request #2397 from vector-im/feature/bma/registration_email
Registration: annoying error message scares every new user when they add an email (#2391)
This commit is contained in:
commit
ae5331cf40
3 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,7 @@ Bugfix 🐛:
|
||||||
- Fix issue when restoring draft after sharing (#2287)
|
- Fix issue when restoring draft after sharing (#2287)
|
||||||
- Fix issue when updating the avatar of a room (new avatar vanishing)
|
- Fix issue when updating the avatar of a room (new avatar vanishing)
|
||||||
- Discard change dialog displayed by mistake when avatar has been updated
|
- 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 🗣:
|
Translations 🗣:
|
||||||
-
|
-
|
||||||
|
|
|
@ -69,6 +69,11 @@ abstract class AbstractLoginFragment : VectorBaseFragment(), OnBackPressed {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showFailure(throwable: Throwable) {
|
override fun showFailure(throwable: Throwable) {
|
||||||
|
// Only the resumed Fragment can eventually show the error, to avoid multiple dialog display
|
||||||
|
if (!isResumed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
when (throwable) {
|
when (throwable) {
|
||||||
is Failure.Cancelled ->
|
is Failure.Cancelled ->
|
||||||
/* Ignore this error, user has cancelled the action */
|
/* Ignore this error, user has cancelled the action */
|
||||||
|
|
|
@ -207,7 +207,6 @@ class LoginViewModel @AssistedInject constructor(
|
||||||
private fun handleCheckIfEmailHasBeenValidated(action: LoginAction.CheckIfEmailHasBeenValidated) {
|
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
|
// We do not want the common progress bar to be displayed, so we do not change asyncRegistration value in the state
|
||||||
currentTask?.cancel()
|
currentTask?.cancel()
|
||||||
currentTask = null
|
|
||||||
currentTask = registrationWizard?.checkIfEmailHasBeenValidated(action.delayMillis, registrationCallback)
|
currentTask = registrationWizard?.checkIfEmailHasBeenValidated(action.delayMillis, registrationCallback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue