Open yasmanmesa opened 7 years ago
It is good, but it should be placed in onFaled not in always:
$PutModel(login).onFailed().toast("An error occurred").retry()
.always().dismiss(progressDialog);
I also prefer retry, since it can be applied to more actions, and not exactly an action that is "loading" information.
It would be great to have a method that does a reload in case the action fails with the model. Following the line of... https://github.com/smaugho/declex/issues/86, could be realized with the reload the same defined actions. For example:
This would execute the $PutModel(login) again and, in case of failure, would display the message. Maybe it would be good to specify the amount of reloads or just do it once more.