formatting changes

This commit is contained in:
Neeraj Gupta 2022-05-11 10:21:25 +05:30
parent 5303ce152c
commit 971484e795
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -134,8 +134,7 @@ Future<io.File> getFileFromServer(
return fileDownloadsInProgress[downloadID];
}
Future<bool> isFileCached(ente.File file,
{bool liveVideo = false}) async {
Future<bool> isFileCached(ente.File file, {bool liveVideo = false}) async {
final cacheManager = (file.fileType == FileType.video || liveVideo)
? VideoCacheManager.instance
: DefaultCacheManager();
@ -160,7 +159,7 @@ Future<io.File> _getLivePhotoFromServer(ente.File file,
return null;
}
return needLiveVideo ? livePhoto.video : livePhoto.image;
} catch (e,s) {
} catch (e, s) {
_logger.warning("live photo get failed", e, s);
livePhotoDownloadsTracker.remove(downloadID);
return null;
@ -226,8 +225,7 @@ Future<_LivePhoto> _downloadLivePhoto(ente.File file,
}
return _LivePhoto(imageFileCache, videoFileCache);
}).catchError((e) {
_logger.warning(
"failed to download live photos : ${file.tag()}", e);
_logger.warning("failed to download live photos : ${file.tag()}", e);
throw e;
});
}