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

Workaround for deletedIDs being empty on android 10
This commit is contained in:
ashilkn
2024-08-08 15:26:14 +05:30
parent 9ec1affcbb
commit b4500ef4d7

View File

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