Reset recordings when changing the date (#13009)

This commit is contained in:
Nicolas Mowen 2024-08-12 15:12:49 -06:00 committed by GitHub
parent 281482927a
commit 05bc3839cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 12 deletions

View File

@ -416,6 +416,7 @@ export default function Events() {
if (selectedReviewData) {
return (
<RecordingView
key={selectedTimeRange.before}
startCamera={selectedReviewData.camera}
startTime={selectedReviewData.start_time}
allCameras={selectedReviewData.allCameras}

View File

@ -430,18 +430,7 @@ export function RecordingView({
filterList={reviewFilterList}
showReviewed
setShowReviewed={() => {}}
onUpdateFilter={(newFilter) => {
// if we are resetting the date to last 24 hours
// then we need to reset the playbackStart time
if (
filter?.before != undefined &&
newFilter?.before == undefined
) {
setPlaybackStart(Date.now() / 1000 - 360);
}
updateFilter(newFilter);
}}
onUpdateFilter={updateFilter}
setMotionOnly={() => {}}
/>
)}