π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Precache
Manav Rathi2bb3e152f832
diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsxindex 60aded0336..8d8b61c703 100644--- a/web/apps/cast/src/pages/slideshow.tsx+++ b/web/apps/cast/src/pages/slideshow.tsx@@ -162,12 +162,34 @@ export default function Slideshow() {}};- useEffect(() => {- if (currentFile) {- getRenderableFileURL();+ const precacheNextRenderableFileURL = async () => {+ if (!nextFile) return;++ const cacheValue = renderableFileURLCache.get(nextFile.id);+ if (cacheValue) return;++ try {+ const blob = await getPreviewableImage(+ nextFile as EnteFile,+ castToken,+ );++ const url = URL.createObjectURL(blob);++ renderableFileURLCache.set(nextFile?.id, url);+ } catch (e) {+ return;}+ };++ useEffect(() => {+ getRenderableFileURL();}, [currentFile]);+ useEffect(() => {+ precacheNextRenderableFileURL();+ }, [nextFile]);+return (<><SlideshowContext.Provider value={{ showNextSlide }}>