π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
At a more opportune place
Manav Rathi138b775c1338
diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsxindex 8d8b61c703..f26d3a5851 100644--- a/web/apps/cast/src/pages/slideshow.tsx+++ b/web/apps/cast/src/pages/slideshow.tsx@@ -130,6 +130,7 @@ export default function Slideshow() {setCurrentFile(nextFile);setNextFile(nextNextFile);+ precacheRenderableFileURL(nextNextFile);};const [renderableFileURL, setRenderableFileURL] = useState<string>("");@@ -162,21 +163,12 @@ export default function Slideshow() {}};- const precacheNextRenderableFileURL = async () => {- if (!nextFile) return;-- const cacheValue = renderableFileURLCache.get(nextFile.id);- if (cacheValue) return;-+ const precacheRenderableFileURL = async (file: EnteFile) => {+ if (renderableFileURLCache.get(file.id)) return;try {- const blob = await getPreviewableImage(- nextFile as EnteFile,- castToken,- );-+ const blob = await getPreviewableImage(file as EnteFile, castToken);const url = URL.createObjectURL(blob);-- renderableFileURLCache.set(nextFile?.id, url);+ renderableFileURLCache.set(file?.id, url);} catch (e) {return;}@@ -186,10 +178,6 @@ export default function Slideshow() {getRenderableFileURL();}, [currentFile]);- useEffect(() => {- precacheNextRenderableFileURL();- }, [nextFile]);-return (<><SlideshowContext.Provider value={{ showNextSlide }}>