Merge pull request #63 from ibs0d/claude/fix-zoom-statistics-WFvOm

fix: show motion dot regardless of liveReady in grid callback path
This commit is contained in:
ibs0d 2026-03-17 13:28:36 +11:00 committed by GitHub
commit 838fb8471c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -301,15 +301,13 @@ export default function LivePlayer({
onLoadingChangeRef.current?.(loading);
}, [cameraEnabled, offline, showStillWithoutActivity, isReEnabling, liveReady]);
// When the parent manages the dot via callback (grid view), show motion
// without gating on liveReady — the dot should reflect actual motion state
// regardless of stream load status to avoid the dot not appearing for
// cameras in continuous mode while the stream is reconnecting.
useEffect(() => {
const motionVisible = !!(
autoLive &&
!offline &&
activeMotion &&
((showStillWithoutActivity && !liveReady) || liveReady)
);
onActiveMotionChangeRef.current?.(motionVisible);
}, [autoLive, offline, activeMotion, showStillWithoutActivity, liveReady]);
onActiveMotionChangeRef.current?.(!!(autoLive && !offline && activeMotion));
}, [autoLive, offline, activeMotion]);
if (!cameraConfig) {
return <ActivityIndicator />;