Remove vertical scrollbars from views on native (#3429)
* remove vertical scrollbars * add to a few missing lists * gate this change * use `hide_vertical_scroll_indicators` * fix gate lint * fix bool
This commit is contained in:
parent
6218eb0eea
commit
c3821fdc31
7 changed files with 88 additions and 51 deletions
|
@ -1,11 +1,14 @@
|
|||
import React, {memo} from 'react'
|
||||
import {FlatListProps, RefreshControl} from 'react-native'
|
||||
import {FlatList_INTERNAL} from './Views'
|
||||
import {addStyle} from 'lib/styles'
|
||||
import {useScrollHandlers} from '#/lib/ScrollContext'
|
||||
import {runOnJS, useSharedValue} from 'react-native-reanimated'
|
||||
|
||||
import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED'
|
||||
import {usePalette} from '#/lib/hooks/usePalette'
|
||||
import {useScrollHandlers} from '#/lib/ScrollContext'
|
||||
import {useGate} from 'lib/statsig/statsig'
|
||||
import {addStyle} from 'lib/styles'
|
||||
import {isWeb} from 'platform/detection'
|
||||
import {FlatList_INTERNAL} from './Views'
|
||||
|
||||
export type ListMethods = FlatList_INTERNAL
|
||||
export type ListProps<ItemT> = Omit<
|
||||
|
@ -37,7 +40,8 @@ function ListImpl<ItemT>(
|
|||
const isScrolledDown = useSharedValue(false)
|
||||
const contextScrollHandlers = useScrollHandlers()
|
||||
const pal = usePalette('default')
|
||||
|
||||
const showsVerticalScrollIndicator =
|
||||
!useGate('hide_vertical_scroll_indicators') || isWeb
|
||||
function handleScrolledDownChange(didScrollDown: boolean) {
|
||||
onScrolledDownChange?.(didScrollDown)
|
||||
}
|
||||
|
@ -93,6 +97,7 @@ function ListImpl<ItemT>(
|
|||
scrollEventThrottle={1}
|
||||
style={style}
|
||||
ref={ref}
|
||||
showsVerticalScrollIndicator={showsVerticalScrollIndicator}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue