From cf6ef84271a1b4dd49ce3cd83443beecab4a0abe Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 17 Mar 2024 06:29:41 -0600 Subject: [PATCH] Mark items as reviewed when manually seeking (#10494) --- .../components/player/PreviewThumbnailPlayer.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/web/src/components/player/PreviewThumbnailPlayer.tsx b/web/src/components/player/PreviewThumbnailPlayer.tsx index 33fd8d1f1..6d10667e4 100644 --- a/web/src/components/player/PreviewThumbnailPlayer.tsx +++ b/web/src/components/player/PreviewThumbnailPlayer.tsx @@ -433,10 +433,17 @@ function VideoPreview({ setIgnoreClick(true); } + if (setReviewed && !review.has_been_reviewed) { + setReviewed(); + } + setProgress(value); playerRef.current.currentTime = playerStartTime + (value / 100.0) * playerDuration; }, + + // we know that these deps are correct + // eslint-disable-next-line react-hooks/exhaustive-deps [ manualPlayback, playerDuration, @@ -585,8 +592,15 @@ function InProgressPreview({ setIgnoreClick(true); } + if (!review.has_been_reviewed) { + setReviewed(review.id); + } + setKey(value); }, + + // we know that these deps are correct + // eslint-disable-next-line react-hooks/exhaustive-deps [manualFrame, setIgnoreClick, setManualFrame, setKey], );