aau-giraf / weekplanner

Main repository of the Weekplanner tablet application
GNU General Public License v3.0
15 stars 3 forks source link

As a guardian, I would like to know when I have written a wrong login fast #429

Closed joandrsn closed 3 years ago

joandrsn commented 4 years ago

Is your feature request related to a problem? Please describe. Currently when logging in, if I type a wrong username/password, I have to wait for 2 seconds until I get the response. This is because instead of returning the auth-call response, a timer is set to 2000 ms. When that timer runs out, a lot of other things are tested before finally actually returning that the actual error was that the username/password combination was wrong. Context: https://github.com/aau-giraf/weekplanner/blob/b37bf396816e6592be1fb44f605759cc13d68b9e/lib/screens/login_screen.dart#L42-L55

Describe the solution you'd like For the BLoC to return as soon as the response is ready.

Additional context This was found when examining #349. In this issue, there is a code example on how the listen functionality could be used to react to the ApiException thrown by the api_client.

Mustafa-ALD commented 3 years ago

Issue 429