mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
Delete assets from server if local deletion fails (#260)
* Delete assets from server if local deletion fails * Remove commented line
This commit is contained in:
parent
dfc0d6eee7
commit
baf533de35
1 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/home/models/delete_asset_response.model.dart';
|
||||
import 'package:immich_mobile/modules/home/services/asset.service.dart';
|
||||
|
@ -45,9 +46,12 @@ class AssetNotifier extends StateNotifier<List<ImmichAsset>> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// final List<String> result = await PhotoManager.editor.deleteWithIds(deleteIdList);
|
||||
await PhotoManager.editor.deleteWithIds(deleteIdList);
|
||||
|
||||
try {
|
||||
await PhotoManager.editor.deleteWithIds(deleteIdList);
|
||||
} catch (e) {
|
||||
debugPrint("Delete asset from device failed: $e");
|
||||
}
|
||||
|
||||
// Delete asset on server
|
||||
List<DeleteAssetResponse>? deleteAssetResult =
|
||||
|
|
Loading…
Add table
Reference in a new issue