From 2ca88ef0a37ee6d33bdb414b84f1822f21be3826 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 4 May 2024 10:26:52 +0530 Subject: [PATCH] Placeholder --- web/apps/cast/src/pages/slideshow.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsx index fb7f95200..60e07b725 100644 --- a/web/apps/cast/src/pages/slideshow.tsx +++ b/web/apps/cast/src/pages/slideshow.tsx @@ -112,7 +112,7 @@ export default function Slideshow() { const nextFile = collectionFiles[nextIndex]; const nextNextFile = collectionFiles[nextNextIndex]; - let nextURL: string + let nextURL: string; try { nextURL = await createRenderableURL(nextFile, castToken); } catch (e) { @@ -120,7 +120,7 @@ export default function Slideshow() { return; } - let nextNextURL: string + let nextNextURL: string; try { nextNextURL = await createRenderableURL( nextNextFile, @@ -133,7 +133,11 @@ export default function Slideshow() { setLoading(false); setCurrentFileId(nextFile.id); + // TODO: These might be the same in case the album has < 3 files + // so commenting this out for now. + // if (currentFileURL) URL.revokeObjectURL(currentFileURL); setCurrentFileURL(nextURL); + // if (nextFileURL) URL.revokeObjectURL(nextFileURL); setNextFileURL(nextNextURL); } catch (e) { console.log("error in showNextSlide", e);