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