From adbc4bd71cff5868ec021036ba09bdd48f377c63 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:09:29 -0600 Subject: [PATCH] don't try to fetch previews when motion search dialog is open --- web/src/views/motion-search/MotionSearchView.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/web/src/views/motion-search/MotionSearchView.tsx b/web/src/views/motion-search/MotionSearchView.tsx index 6789dad89..122e05985 100644 --- a/web/src/views/motion-search/MotionSearchView.tsx +++ b/web/src/views/motion-search/MotionSearchView.tsx @@ -131,12 +131,10 @@ export default function MotionSearchView({ ); // Camera previews – defer until dialog is closed - const allPreviews = useCameraPreviews( - isSearchDialogOpen ? { after: 0, before: 0 } : timeRange, - { - camera: selectedCamera ?? undefined, - }, - ); + const allPreviews = useCameraPreviews(timeRange, { + camera: selectedCamera ?? undefined, + fetchPreviews: !isSearchDialogOpen, + }); // ROI state const [polygonPoints, setPolygonPoints] = useState([]);