fix(mobile): Fix upload hang on iOS when deleting stale files (#5658)

* fix(mobile): Fix upload hang on iOS when deleting stale files

* Cleaner fix
This commit is contained in:
Alex 2023-12-12 11:36:37 -06:00 committed by GitHub
parent c602eaea4a
commit c7df800d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,8 +225,6 @@ class BackupService {
} }
final String deviceId = Store.get(StoreKey.deviceId); final String deviceId = Store.get(StoreKey.deviceId);
final String savedEndpoint = Store.get(StoreKey.serverEndpoint); final String savedEndpoint = Store.get(StoreKey.serverEndpoint);
File? file;
File? livePhotoFile;
bool anyErrors = false; bool anyErrors = false;
final List<String> duplicatedAssetIds = []; final List<String> duplicatedAssetIds = [];
@ -248,6 +246,9 @@ class BackupService {
: assetList.toList(); : assetList.toList();
for (var entity in assetsToUpload) { for (var entity in assetsToUpload) {
File? file;
File? livePhotoFile;
try { try {
final isAvailableLocally = final isAvailableLocally =
await entity.isLocallyAvailable(isOrigin: true); await entity.isLocallyAvailable(isOrigin: true);