π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
full
Manav Rathi6f0deba3edf3
diff --git a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts b/web/packages/new/photos/components/FileViewerPhotoSwipe.tsindex 1637b05cd9..91d3cd3ccf 100644--- a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts+++ b/web/packages/new/photos/components/FileViewerPhotoSwipe.ts@@ -192,17 +192,29 @@ export class FileViewerPhotoSwipe {}async enqueueUpdates(index: number, file: EnteFile) {+ const update = (itemData: SlideData) => {+ this.itemDataByFileID.set(file.id, itemData);+ this.pswp.refreshSlideContent(index);+ };+const thumbnailURL = await downloadManager.renderableThumbnailURL(file);// We don't have the dimensions of the thumbnail. We could try to deduce// something from the file's aspect ratio etc, but that's not needed:// PhotoSwipe already correctly (for our purposes) handles just a source// URL being present.- this.itemDataByFileID.set(file.id, { src: thumbnailURL });- this.pswp.refreshSlideContent(index);+ update({ src: thumbnailURL });switch (file.metadata.fileType) {- case FileType.image:+ case FileType.image: {+ const sourceURLs =+ await downloadManager.renderableSourceURLs(file);+ update({+ src: sourceURLs.url,+ width: file.pubMagicMetadata?.data?.w,+ height: file.pubMagicMetadata?.data?.h,+ });break;+ }default:break;