mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:53:25 +00:00
fix: adjust values and overlay visibilty based on gesture velocity change
This commit is contained in:
@@ -9,10 +9,13 @@ export const useVolume = () => {
|
||||
const volume = useSharedValue(1);
|
||||
const debouncedVolume = useDebounce(volume.value, 20);
|
||||
|
||||
const handleVolumeChange = useCallback((newValue: number) => {
|
||||
volume.value = newValue;
|
||||
setShowVolumeOverlay(true);
|
||||
}, []);
|
||||
const handleVolumeChange = useCallback(
|
||||
(newValue: number) => {
|
||||
volume.value = newValue;
|
||||
setShowVolumeOverlay(true);
|
||||
},
|
||||
[volume],
|
||||
);
|
||||
|
||||
return {
|
||||
showVolumeOverlay: debouncedShowVolumeOverlay,
|
||||
|
Reference in New Issue
Block a user