From 48cc27c378c33bfe10e4eb7bc2d658ce3d6631b7 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 8 Aug 2025 07:37:33 -0500 Subject: [PATCH] Ensure alertVideos persistence is loaded before displaying thumb or preview The default value of true would cause previews to be loaded in the background even if the local storage value was false --- web/src/components/card/AnimatedEventCard.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/card/AnimatedEventCard.tsx b/web/src/components/card/AnimatedEventCard.tsx index d46509eb6..a04804641 100644 --- a/web/src/components/card/AnimatedEventCard.tsx +++ b/web/src/components/card/AnimatedEventCard.tsx @@ -91,7 +91,10 @@ export function AnimatedEventCard({ // image behavior - const [alertVideos] = usePersistence("alertVideos", true); + const [alertVideos, _, alertVideosLoaded] = usePersistence( + "alertVideos", + true, + ); const aspectRatio = useMemo(() => { if ( @@ -135,7 +138,7 @@ export function AnimatedEventCard({ {t("markAsReviewed")} )} - {previews != undefined && ( + {previews != undefined && alertVideosLoaded && (