mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: delete actions (#20034)
* chore: show delete local * pr feedback * restore and perm delete action
This commit is contained in:
parent
2efca67217
commit
aa344a3989
18 changed files with 285 additions and 18 deletions
|
|
@ -127,9 +127,25 @@ class ActionService {
|
|||
await _remoteAssetRepository.trash(remoteIds);
|
||||
}
|
||||
|
||||
Future<void> delete(List<String> remoteIds) async {
|
||||
Future<void> restoreTrash(List<String> ids) async {
|
||||
await _assetApiRepository.restoreTrash(ids);
|
||||
await _remoteAssetRepository.restoreTrash(ids);
|
||||
}
|
||||
|
||||
Future<void> deleteRemoteAndLocal(
|
||||
List<String> remoteIds,
|
||||
List<String> localIds,
|
||||
) async {
|
||||
await _assetApiRepository.delete(remoteIds, true);
|
||||
await _remoteAssetRepository.delete(remoteIds);
|
||||
|
||||
if (localIds.isNotEmpty) {
|
||||
final deletedIds = await _assetMediaRepository.deleteAll(localIds);
|
||||
|
||||
if (deletedIds.isNotEmpty) {
|
||||
await _localAssetRepository.delete(deletedIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> deleteLocal(List<String> localIds) async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue