1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

fix(mobile): show new local assets in offline mode (#16817)

fix: show new local assets in offline mode
This commit is contained in:
Alex
2025-03-24 11:56:18 -05:00
committed by GitHub
parent 89656472ef
commit 8bc80076bb
2 changed files with 17 additions and 14 deletions

View File

@@ -64,6 +64,7 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {
} }
await _ref.read(serverInfoProvider.notifier).getServerVersion(); await _ref.read(serverInfoProvider.notifier).getServerVersion();
}
switch (_ref.read(tabProvider)) { switch (_ref.read(tabProvider)) {
case TabEnum.home: case TabEnum.home:
@@ -80,7 +81,6 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {
// nothing to do // nothing to do
break; break;
} }
}
_ref.read(websocketProvider.notifier).connect(); _ref.read(websocketProvider.notifier).connect();

View File

@@ -75,6 +75,9 @@ class AssetNotifier extends StateNotifier<bool> {
} }
log.info("Load assets: ${stopwatch.elapsedMilliseconds}ms"); log.info("Load assets: ${stopwatch.elapsedMilliseconds}ms");
} catch (error) {
// If there is error in getting the remote assets, still showing the new local assets
await _albumService.refreshDeviceAlbums();
} finally { } finally {
_getAllAssetInProgress = false; _getAllAssetInProgress = false;
state = false; state = false;