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 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; } }