mirror of
https://github.com/immich-app/immich.git
synced 2025-07-17 20:38:25 +02:00
refactor(mobile): asset provider (#16159)
* refactor(mobile): asset provider * wip * wip: delete local assets * wip: delete remote assets * wip: deletion logic * refactor * pr feedback
This commit is contained in:
parent
70d08a2b2a
commit
9d4aee36e2
24 changed files with 326 additions and 299 deletions
|
@ -51,6 +51,8 @@ abstract interface class IAlbumRepository implements IDatabaseRepository {
|
|||
Stream<Album?> watchAlbum(int id);
|
||||
|
||||
Stream<RenderList> getRenderListStream(Album album);
|
||||
|
||||
Future<void> clearTable();
|
||||
}
|
||||
|
||||
enum AlbumSort { remoteId, localId }
|
||||
|
|
|
@ -41,7 +41,7 @@ abstract interface class IAssetRepository implements IDatabaseRepository {
|
|||
|
||||
Future<void> deleteAllByRemoteId(List<String> ids, {AssetState? state});
|
||||
|
||||
Future<void> deleteById(List<int> ids);
|
||||
Future<void> deleteByIds(List<int> ids);
|
||||
|
||||
Future<List<Asset>> getMatches({
|
||||
required List<Asset> assets,
|
||||
|
@ -59,6 +59,10 @@ abstract interface class IAssetRepository implements IDatabaseRepository {
|
|||
Future<List<String>> getAllDuplicatedAssetIds();
|
||||
|
||||
Future<List<Asset>> getStackAssets(String stackId);
|
||||
|
||||
Future<void> clearTable();
|
||||
|
||||
Stream<Asset?> watchAsset(int id, {bool fireImmediately = false});
|
||||
}
|
||||
|
||||
enum AssetSort { checksum, ownerIdChecksum }
|
||||
|
|
|
@ -11,4 +11,6 @@ abstract interface class IETagRepository implements IDatabaseRepository {
|
|||
Future<void> upsertAll(List<ETag> etags);
|
||||
|
||||
Future<void> deleteByIds(List<String> ids);
|
||||
|
||||
Future<void> clearTable();
|
||||
}
|
||||
|
|
|
@ -9,4 +9,6 @@ abstract interface class IExifInfoRepository implements IDatabaseRepository {
|
|||
Future<List<ExifInfo>> updateAll(List<ExifInfo> exifInfos);
|
||||
|
||||
Future<void> delete(int id);
|
||||
|
||||
Future<void> clearTable();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ abstract interface class IUserRepository implements IDatabaseRepository {
|
|||
Future<void> deleteById(List<int> ids);
|
||||
|
||||
Future<User> me();
|
||||
|
||||
Future<void> clearTable();
|
||||
}
|
||||
|
||||
enum UserSort { id }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue