Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Workaround for android 10 free up space issue

ashilknb4500ef4d70e
diff --git a/mobile/lib/utils/delete_file_util.dart b/mobile/lib/utils/delete_file_util.dart
index 545ea9c27a..2121a748b9 100644
--- a/mobile/lib/utils/delete_file_util.dart
+++ b/mobile/lib/utils/delete_file_util.dart
@@ -373,8 +373,14 @@ Future<bool> deleteLocalFiles(
);
return true;
} else {
- showToast(context, S.of(context).couldNotFreeUpSpace);
- return false;
+ //On android 10, even if files were deleted, deletedIDs is empty.
+ //This is a workaround so that users are not shown an error message on
+ //android 10
+ if (!await isAndroidSDKVersionLowerThan(android11SDKINT)) {
+ showToast(context, S.of(context).couldNotFreeUpSpace);
+ return false;
+ }
+ return true;
}
}