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:
parent
dfc0d6eee7
commit
baf533de35
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.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/models/delete_asset_response.model.dart';
|
||||||
import 'package:immich_mobile/modules/home/services/asset.service.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);
|
try {
|
||||||
await PhotoManager.editor.deleteWithIds(deleteIdList);
|
await PhotoManager.editor.deleteWithIds(deleteIdList);
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint("Delete asset from device failed: $e");
|
||||||
|
}
|
||||||
|
|
||||||
// Delete asset on server
|
// Delete asset on server
|
||||||
List<DeleteAssetResponse>? deleteAssetResult =
|
List<DeleteAssetResponse>? deleteAssetResult =
|
||||||
|
Loading…
Reference in New Issue
Block a user