Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed slider flicker issue when sliding in revese side (#2368)

authored by

Rahul Yadav and committed by
GitHub
2c31e2a0 a410aad2

+7 -1
+7 -1
src/view/screens/PreferencesHomeFeed.tsx
··· 29 29 const pal = usePalette('default') 30 30 const [value, setValue] = useState(initialValue) 31 31 const {mutate: setFeedViewPref} = useSetFeedViewPreferencesMutation() 32 + const preValue = React.useRef(initialValue) 32 33 const save = React.useMemo( 33 34 () => 34 35 debounce( ··· 46 47 <Slider 47 48 value={value} 48 49 onValueChange={(v: number | number[]) => { 49 - const threshold = Math.floor(Array.isArray(v) ? v[0] : v) 50 + let threshold = Array.isArray(v) ? v[0] : v 51 + if (threshold > preValue.current) threshold = Math.floor(threshold) 52 + else threshold = Math.ceil(threshold) 53 + 54 + preValue.current = threshold 55 + 50 56 setValue(threshold) 51 57 save(threshold) 52 58 }}