1
0
mirror of https://github.com/immich-app/immich.git synced 2025-01-02 12:48:35 +02: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:
Matthias Rupp 2022-06-24 17:02:09 +02:00 committed by GitHub
parent dfc0d6eee7
commit baf533de35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';
@ -46,8 +47,11 @@ class AssetNotifier extends StateNotifier<List<ImmichAsset>> {
}
}
// final List<String> result = 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 =