Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Add more logs on deleting local files

ashilkna999eddbfe93
diff --git a/mobile/lib/utils/delete_file_util.dart b/mobile/lib/utils/delete_file_util.dart
index 545ea9c27a..e519db77c0 100644
--- a/mobile/lib/utils/delete_file_util.dart
+++ b/mobile/lib/utils/delete_file_util.dart
@@ -342,8 +342,10 @@ Future<bool> deleteLocalFiles(
final bool shouldDeleteInBatches =
await isAndroidSDKVersionLowerThan(android11SDKINT);
if (shouldDeleteInBatches) {
+ _logger.info("Deleting in batches");
deletedIDs.addAll(await deleteLocalFilesInBatches(context, localAssetIDs));
} else {
+ _logger.info("Deleting in one shot");
deletedIDs.addAll(await _deleteLocalFilesInOneShot(context, localAssetIDs));
}
// In IOS, the library returns no error and fail to delete any file is
@@ -426,6 +428,7 @@ Future<List<String>> deleteLocalFilesInBatches(
max(minimumBatchSize, (localIDs.length / minimumParts).round()),
maximumBatchSize,
);
+ _logger.info("Batch size: $batchSize");
final List<String> deletedIDs = [];
for (int index = 0; index < localIDs.length; index += batchSize) {
if (dialogKey.currentState != null) {