mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +03:00
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
This commit is contained in:
parent
687b68246b
commit
48cc27c378
@ -91,7 +91,10 @@ export function AnimatedEventCard({
|
|||||||
|
|
||||||
// image behavior
|
// image behavior
|
||||||
|
|
||||||
const [alertVideos] = usePersistence("alertVideos", true);
|
const [alertVideos, _, alertVideosLoaded] = usePersistence(
|
||||||
|
"alertVideos",
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
|
||||||
const aspectRatio = useMemo(() => {
|
const aspectRatio = useMemo(() => {
|
||||||
if (
|
if (
|
||||||
@ -135,7 +138,7 @@ export function AnimatedEventCard({
|
|||||||
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
|
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{previews != undefined && (
|
{previews != undefined && alertVideosLoaded && (
|
||||||
<div
|
<div
|
||||||
className="size-full cursor-pointer"
|
className="size-full cursor-pointer"
|
||||||
onClick={onOpenReview}
|
onClick={onOpenReview}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user