[mob][photos] Use better name
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user