1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

fix(mobile): long waiting time for login request when server is unreachable (#12100)

* fix(mobile): long waiting time for login request when server is unreachable

* lint

* increase timeout duration
This commit is contained in:
Alex 2024-08-29 13:46:47 -05:00 committed by GitHub
parent 74f18a4523
commit 9bfaa525db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,8 +170,10 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
UserPreferencesResponseDto? userPreferences;
try {
final responses = await Future.wait([
_apiService.usersApi.getMyUser(),
_apiService.usersApi.getMyPreferences(),
_apiService.usersApi.getMyUser().timeout(const Duration(seconds: 7)),
_apiService.usersApi
.getMyPreferences()
.timeout(const Duration(seconds: 7)),
]);
userResponse = responses[0] as UserAdminResponseDto;
userPreferences = responses[1] as UserPreferencesResponseDto;