rm clamp (#9271)
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
type NativeGesture,
|
||||
} from 'react-native-gesture-handler'
|
||||
import Animated, {
|
||||
clamp,
|
||||
interpolate,
|
||||
runOnJS,
|
||||
runOnUI,
|
||||
@@ -258,8 +259,3 @@ function PlayerListener({
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
function clamp(num: number, min: number, max: number) {
|
||||
'worklet'
|
||||
return Math.min(Math.max(num, min), max)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import React, {useCallback, useEffect} from 'react'
|
||||
import {type NativeScrollEvent} from 'react-native'
|
||||
import {interpolate, useSharedValue, withSpring} from 'react-native-reanimated'
|
||||
import {
|
||||
clamp,
|
||||
interpolate,
|
||||
useSharedValue,
|
||||
withSpring,
|
||||
} from 'react-native-reanimated'
|
||||
import EventEmitter from 'eventemitter3'
|
||||
|
||||
import {ScrollProvider} from '#/lib/ScrollContext'
|
||||
@@ -10,11 +15,6 @@ import {useShellLayout} from '#/state/shell/shell-layout'
|
||||
|
||||
const WEB_HIDE_SHELL_THRESHOLD = 200
|
||||
|
||||
function clamp(num: number, min: number, max: number) {
|
||||
'worklet'
|
||||
return Math.min(Math.max(num, min), max)
|
||||
}
|
||||
|
||||
export function MainScrollProvider({children}: {children: React.ReactNode}) {
|
||||
const {headerHeight} = useShellLayout()
|
||||
const {headerMode} = useMinimalShellMode()
|
||||
|
||||
Reference in New Issue
Block a user