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
|
|
@ -13,6 +13,7 @@ final assetApiRepositoryProvider = Provider(
|
|||
ref.watch(apiServiceProvider).assetsApi,
|
||||
ref.watch(apiServiceProvider).searchApi,
|
||||
ref.watch(apiServiceProvider).stacksApi,
|
||||
ref.watch(apiServiceProvider).trashApi,
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -20,8 +21,14 @@ class AssetApiRepository extends ApiRepository {
|
|||
final AssetsApi _api;
|
||||
final SearchApi _searchApi;
|
||||
final StacksApi _stacksApi;
|
||||
final TrashApi _trashApi;
|
||||
|
||||
AssetApiRepository(this._api, this._searchApi, this._stacksApi);
|
||||
AssetApiRepository(
|
||||
this._api,
|
||||
this._searchApi,
|
||||
this._stacksApi,
|
||||
this._trashApi,
|
||||
);
|
||||
|
||||
Future<Asset> update(String id, {String? description}) async {
|
||||
final response = await checkNull(
|
||||
|
|
@ -56,6 +63,10 @@ class AssetApiRepository extends ApiRepository {
|
|||
return _api.deleteAssets(AssetBulkDeleteDto(ids: ids, force: force));
|
||||
}
|
||||
|
||||
Future<void> restoreTrash(List<String> ids) async {
|
||||
await _trashApi.restoreAssets(BulkIdsDto(ids: ids));
|
||||
}
|
||||
|
||||
Future<void> updateVisibility(
|
||||
List<String> ids,
|
||||
AssetVisibilityEnum visibility,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue