rework trashed assets handling

- add new table trashed_local_asset
- mirror trashed assets data in trashed_local_asset.
- compute checksums for assets trashed out-of-app.
- restore assets present in trashed_local_asset and non-trashed in remote_asset.
- simplify moving-to-trash logic based on remote_asset events.
This commit is contained in:
Peter Ombodi 2025-09-18 13:55:56 +03:00
parent 3d56a5ca9c
commit f7e5288173
29 changed files with 2085 additions and 876 deletions

View file

@ -29,6 +29,7 @@ final syncStreamRepositoryProvider = Provider((ref) => SyncStreamRepository(ref.
final localSyncServiceProvider = Provider(
(ref) => LocalSyncService(
localAlbumRepository: ref.watch(localAlbumRepository),
trashSyncService: ref.watch(trashSyncServiceProvider),
nativeSyncApi: ref.watch(nativeSyncApiProvider),
),
);
@ -39,5 +40,6 @@ final hashServiceProvider = Provider(
localAssetRepository: ref.watch(localAssetRepository),
storageRepository: ref.watch(storageRepositoryProvider),
nativeSyncApi: ref.watch(nativeSyncApiProvider),
trashSyncService: ref.watch(trashSyncServiceProvider),
),
);