1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(mobile): uninitialize provider causes unable to logging in (#12970)

fix(mobile): use uninitialize provider
This commit is contained in:
Alex 2024-09-27 09:40:55 +07:00 committed by GitHub
parent d5ee823fbc
commit 971ba63447
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,12 +86,16 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {
void handleAppPause() {
state = AppLifeCycleEnum.paused;
_wasPaused = true;
if (_ref.read(authenticationProvider).isAuthenticated) {
// Do not cancel backup if manual upload is in progress
if (_ref.read(backupProvider.notifier).backupProgress !=
BackUpProgressEnum.manualInProgress) {
_ref.read(backupProvider.notifier).cancelBackup();
}
_ref.read(websocketProvider.notifier).disconnect();
}
ImmichLogger().flush();
}