mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-25 18:30:56 -06:00
parent
c867d90f50
commit
9bbb88cdcb
@ -70,12 +70,6 @@ export default function PreviewThumbnailPlayer({
|
||||
[ignoreClick, review, onClick],
|
||||
);
|
||||
|
||||
const swipeHandlers = useSwipeable({
|
||||
onSwipedLeft: () => (setReviewed ? setReviewed(review) : null),
|
||||
onSwipedRight: () => setPlayback(true),
|
||||
preventScrollOnSwipe: true,
|
||||
});
|
||||
|
||||
const handleSetReviewed = useCallback(() => {
|
||||
if (review.end_time && !review.has_been_reviewed) {
|
||||
review.has_been_reviewed = true;
|
||||
@ -83,6 +77,15 @@ export default function PreviewThumbnailPlayer({
|
||||
}
|
||||
}, [review, setReviewed]);
|
||||
|
||||
const swipeHandlers = useSwipeable({
|
||||
onSwipedLeft: () => {
|
||||
setPlayback(false);
|
||||
handleSetReviewed();
|
||||
},
|
||||
onSwipedRight: () => setPlayback(true),
|
||||
preventScrollOnSwipe: true,
|
||||
});
|
||||
|
||||
useContextMenu(imgRef, () => {
|
||||
onClick(review, true);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user