Skip to content

Commit

Permalink
Reset recordings when changing the date (#13009)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored Aug 12, 2024
1 parent 2814829 commit 05bc383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
1 change: 1 addition & 0 deletions web/src/pages/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
13 changes: 1 addition & 12 deletions web/src/views/events/RecordingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={() => {}}
/>
)}
Expand Down

0 comments on commit 05bc383

Please sign in to comment.