π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Empty seems to work
Manav Rathi8c68af7772c5
diff --git a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts b/web/packages/new/photos/components/FileViewerPhotoSwipe.tsindex d58d9d5b8e..53cc0bad2d 100644--- a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts+++ b/web/packages/new/photos/components/FileViewerPhotoSwipe.ts@@ -139,11 +139,13 @@ export class FileViewerPhotoSwipe {if (!file) assertionFailed();if (itemData) return itemData;- return {- src: `https://dummyimage.com/100/777/fff/?text=i${index}`,- width: 100,- height: 100,- };++ // We don't have anything to show immediately, though in most cases+ // a cached renderable thumbnail URL will be available shortly.+ // Meanwhile return empty slide data: PhotoSwipe will not show+ // anything in the image area but will otherwise render the+ // surrounding UI properly.+ return {};});pswp.on("close", () => {// The user did some action within the file viewer to close it. Let@@ -181,6 +183,10 @@ export class FileViewerPhotoSwipe {async enqueueUpdates(index: number, file: EnteFile) {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);}