Skip to content

armgit / ente

Public Imported from GitHub
0

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

Exclusive

Manav Rathi132962b92f65
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index c4ff37318a..4610762bcb 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -298,9 +298,11 @@ export class FileViewerPhotoSwipe {
html: createPSRegisterElementIconHTML("error"),
onInit: (errorElement, pswp) => {
pswp.on("change", () => {
+ const { fetchFailed, isContentLoading } =
+ pswp.currSlide.content.data;
errorElement.classList.toggle(
"pswp__error--active",
- pswp.currSlide.content.data.fetchFailed,
+ !!fetchFailed && !isContentLoading,
);
});
},