rework fetching trashed assets data on native side

optimize handling trashed assets in local sync service
refactor code
This commit is contained in:
Peter Ombodi 2025-10-08 18:47:42 +03:00
parent cd43564d46
commit 519e428b99
8 changed files with 133 additions and 97 deletions

View file

@ -59,7 +59,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
/// Applies resulted snapshot of trashed assets:
/// - upserts incoming rows
/// - deletes rows that are not present in the snapshot
Future<void> applyTrashSnapshot(Iterable<TrashedAsset> trashedAssets) async {
Future<void> applySnapshot(Iterable<TrashedAsset> trashedAssets) async {
if (trashedAssets.isEmpty) {
await _db.delete(_db.trashedLocalAssetEntity).go();
return;