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

refactor(mobile): asset stack provider (#16100)

* refactor(mobile): asset stack provider

* remove file from ignore list
This commit is contained in:
Alex
2025-02-14 13:23:14 -06:00
committed by GitHub
parent 8ab87a8803
commit 47203d2760
6 changed files with 33 additions and 23 deletions

View File

@ -197,6 +197,19 @@ class AssetRepository extends DatabaseRepository implements IAssetRepository {
@override
Future<void> deleteAllByRemoteId(List<String> ids, {AssetState? state}) =>
txn(() => _getAllByRemoteIdImpl(ids, state).deleteAll());
@override
Future<List<Asset>> getStackAssets(String stackId) {
return db.assets
.filter()
.isArchivedEqualTo(false)
.isTrashedEqualTo(false)
.stackIdEqualTo(stackId)
// orders primary asset first as its ID is null
.sortByStackPrimaryAssetId()
.thenByFileCreatedAtDesc()
.findAll();
}
}
Future<List<Asset>> _getMatchesImpl(