mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(mobile): ios random logout (#8997)
* fix(mobile): random logout * move logout mechanism to the end * More logs * wording * more logs * fixed * Better check
This commit is contained in:
parent
70c78a09a4
commit
48b0b7e8bd
6 changed files with 70 additions and 25 deletions
|
|
@ -181,10 +181,21 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
|
|||
UserResponseDto? userResponseDto;
|
||||
try {
|
||||
userResponseDto = await _apiService.userApi.getMyUserInfo();
|
||||
} on ApiException catch (e) {
|
||||
if (e.innerException is SocketException) {
|
||||
} on ApiException catch (error, stackTrace) {
|
||||
_log.severe(
|
||||
"Error getting user information from the server [API EXCEPTION]",
|
||||
error,
|
||||
stackTrace,
|
||||
);
|
||||
if (error.innerException is SocketException) {
|
||||
state = state.copyWith(isAuthenticated: true);
|
||||
}
|
||||
} catch (error, stackTrace) {
|
||||
_log.severe(
|
||||
"Error getting user information from the server [CATCH ALL]",
|
||||
error,
|
||||
stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
if (userResponseDto != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue