Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Simplify

laurenspriemb8ccc74dacfe
diff --git a/mobile/lib/services/remote_assets_service.dart b/mobile/lib/services/remote_assets_service.dart
index bbceb4ac13..8426c286eb 100644
--- a/mobile/lib/services/remote_assets_service.dart
+++ b/mobile/lib/services/remote_assets_service.dart
@@ -33,17 +33,8 @@ class RemoteAssetsService {
}
Future<String> getAssetPath(String remotePath, {bool refetch = false}) async {
- final path = await _getLocalPath(remotePath);
- final file = File(path);
- if (file.existsSync() && !refetch) {
- _logger.info("Returning path of cached file for $remotePath");
- return file.path;
- } else {
- final tempFile = File(path + ".temp");
- await _downloadFile(remotePath, tempFile.path);
- tempFile.renameSync(path);
- return path;
- }
+ final file = await getAsset(remotePath, refetch: refetch);
+ return file.path;
}
///Returns asset if the remote asset is new compared to the local copy of it