[mob][photos] Use better name

This commit is contained in:
ashilkn
2025-03-05 18:00:12 +05:30
parent ec90db7b7d
commit abe313fff2
2 changed files with 9 additions and 8 deletions

View File

@@ -166,20 +166,21 @@ class _FreeSpacePageState extends State<FreeSpacePage> {
}
Future<void> _freeStorage(BackupStatus status) async {
bool result = await deleteLocalFiles(context, status.localIDs);
bool isSuccess = await deleteLocalFiles(context, status.localIDs);
if (result == false) {
result = await deleteLocalFilesAfterRemovingAlreadyDeletedIDs(
if (isSuccess == false) {
isSuccess = await deleteLocalFilesAfterRemovingAlreadyDeletedIDs(
context,
status.localIDs,
);
}
if (result == false && Platform.isAndroid) {
result = await retryFreeUpSpaceAfterRemovingNonExistingAssets(context);
if (isSuccess == false && Platform.isAndroid) {
isSuccess =
await retryFreeUpSpaceAfterRemovingAssetsNonExistingInDisk(context);
}
if (result) {
if (isSuccess) {
Navigator.of(context).pop(true);
} else {
showToast(context, S.of(context).couldNotFreeUpSpace);

View File

@@ -469,11 +469,11 @@ Future<bool> deleteLocalFilesAfterRemovingAlreadyDeletedIDs(
}
/// Only to be used on Android
Future<bool> retryFreeUpSpaceAfterRemovingNonExistingAssets(
Future<bool> retryFreeUpSpaceAfterRemovingAssetsNonExistingInDisk(
BuildContext context,
) async {
_logger.info(
"Retrying free up space after removing non-existing assets",
"Retrying free up space after removing assets non-existing in disk",
);
final dialog =