Bluesky app fork with some witchin' additions 💫

rm clamp (#9271)

authored by

Maxym Hyba and committed by
GitHub
faa389e0 f15a949e

+7 -11
+1 -5
src/screens/VideoFeed/components/Scrubber.tsx
··· 6 6 type NativeGesture, 7 7 } from 'react-native-gesture-handler' 8 8 import Animated, { 9 + clamp, 9 10 interpolate, 10 11 runOnJS, 11 12 runOnUI, ··· 258 259 259 260 return null 260 261 } 261 - 262 - function clamp(num: number, min: number, max: number) { 263 - 'worklet' 264 - return Math.min(Math.max(num, min), max) 265 - }
+6 -6
src/view/com/util/MainScrollProvider.tsx
··· 1 1 import React, {useCallback, useEffect} from 'react' 2 2 import {type NativeScrollEvent} from 'react-native' 3 - import {interpolate, useSharedValue, withSpring} from 'react-native-reanimated' 3 + import { 4 + clamp, 5 + interpolate, 6 + useSharedValue, 7 + withSpring, 8 + } from 'react-native-reanimated' 4 9 import EventEmitter from 'eventemitter3' 5 10 6 11 import {ScrollProvider} from '#/lib/ScrollContext' ··· 9 14 import {useShellLayout} from '#/state/shell/shell-layout' 10 15 11 16 const WEB_HIDE_SHELL_THRESHOLD = 200 12 - 13 - function clamp(num: number, min: number, max: number) { 14 - 'worklet' 15 - return Math.min(Math.max(num, min), max) 16 - } 17 17 18 18 export function MainScrollProvider({children}: {children: React.ReactNode}) { 19 19 const {headerHeight} = useShellLayout()