mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05: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:
parent
74f18a4523
commit
9bfaa525db
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue