mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix(mobile): faster device album refresh after initial sync (#17170)
fix(mobile): faster device album refresh after fresh sync Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
fecf3809a6
commit
c72c82c401
1 changed files with 5 additions and 0 deletions
|
|
@ -737,6 +737,11 @@ class SyncService {
|
||||||
album.thumbnail.value = thumb;
|
album.thumbnail.value = thumb;
|
||||||
try {
|
try {
|
||||||
await _albumRepository.create(album);
|
await _albumRepository.create(album);
|
||||||
|
final int assetCount =
|
||||||
|
await _albumMediaRepository.getAssetCount(album.localId!);
|
||||||
|
await _eTagRepository.upsertAll([
|
||||||
|
ETag(id: album.eTagKeyAssetCount, assetCount: assetCount),
|
||||||
|
]);
|
||||||
_log.info("Added a new local album to DB: ${album.name}");
|
_log.info("Added a new local album to DB: ${album.name}");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
_log.severe("Failed to add new local album ${album.name} to DB", e);
|
_log.severe("Failed to add new local album ${album.name} to DB", e);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue