mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-13 13:47:36 +02:00
Ensure alertVideos persistence is loaded before displaying thumb or preview (#19432)
The default value of true would cause previews to be loaded in the background even if the local storage value was false
This commit is contained in:
parent
687b68246b
commit
c75d30d902
@ -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({
|
||||
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
{previews != undefined && (
|
||||
{previews != undefined && alertVideosLoaded && (
|
||||
<div
|
||||
className="size-full cursor-pointer"
|
||||
onClick={onOpenReview}
|
||||
|
Loading…
Reference in New Issue
Block a user