π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Address review comment
vishnukvmd3d6bda64027c
diff --git a/lib/utils/thumbnail_util.dart b/lib/utils/thumbnail_util.dartindex 9af79a835c..dc21676325 100644--- a/lib/utils/thumbnail_util.dart+++ b/lib/utils/thumbnail_util.dart@@ -45,9 +45,13 @@ Future<Uint8List?> getThumbnail(EnteFile file) async {// Note: This method should only be called for files that have been uploaded// since cachedThumbnailPath depends on the file's uploadedIDFuture<File?> getThumbnailForUploadedFile(EnteFile file) async {+ final cachedThumbnail = cachedThumbnailPath(file);+ if (await cachedThumbnail.exists()) {+ return cachedThumbnail;+ }final thumbnail = await getThumbnail(file);if (thumbnail != null) {- final cachedThumbnail = cachedThumbnailPath(file);+ // it might be already written to this path during `getThumbnail(file)`if (!await cachedThumbnail.exists()) {await cachedThumbnail.writeAsBytes(thumbnail, flush: true);}