Skip to content

Commit

Permalink
fix(mobile): uninitialize provider causes unable to logging in (#12970)
Browse files Browse the repository at this point in the history
fix(mobile): use uninitialize provider
  • Loading branch information
alextran1502 authored Sep 27, 2024
1 parent d5ee823 commit 971ba63
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mobile/lib/providers/app_life_cycle.provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {
void handleAppPause() {
state = AppLifeCycleEnum.paused;
_wasPaused = true;
// Do not cancel backup if manual upload is in progress
if (_ref.read(backupProvider.notifier).backupProgress !=
BackUpProgressEnum.manualInProgress) {
_ref.read(backupProvider.notifier).cancelBackup();

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();
}
_ref.read(websocketProvider.notifier).disconnect();

ImmichLogger().flush();
}

Expand Down

0 comments on commit 971ba63

Please sign in to comment.