mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 08:03:26 +00:00
fix slider not triggering idle
This commit is contained in:
@@ -34,6 +34,7 @@ const VideoSlider = ({ onSlidingComplete }: VideoSliderProps) => {
|
||||
const tapRef = useRef<TapGestureHandler>(null);
|
||||
const panRef = useRef<PanGestureHandler>(null);
|
||||
const status = usePlayerStore((state) => state.status);
|
||||
const setIsIdle = usePlayerStore((state) => state.setIsIdle);
|
||||
|
||||
const width = Dimensions.get("screen").width - 200;
|
||||
const knobSize_ = 20;
|
||||
@@ -66,6 +67,7 @@ const VideoSlider = ({ onSlidingComplete }: VideoSliderProps) => {
|
||||
const _onActive = (value: number) => {
|
||||
"worklet";
|
||||
translateX.value = clamp(value, 0, width - knobSize_);
|
||||
runOnJS(setIsIdle)(false);
|
||||
};
|
||||
|
||||
const onGestureEvent = useAnimatedGestureHandler<
|
||||
|
Reference in New Issue
Block a user