diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx index 1e661dee59..20fab7a7db 100644 --- a/src/view/com/util/Views.web.tsx +++ b/src/view/com/util/Views.web.tsx @@ -60,7 +60,7 @@ export const FlatList = React.forwardRef(function FlatListImpl( contentContainerStyle, onEndReached, onEndReachedThreshold, - onScroll, + onScroll: _unused, // Not supported on the web. ListHeaderComponent, ListFooterComponent, desktopFixedHeight, @@ -115,24 +115,6 @@ export const FlatList = React.forwardRef(function FlatListImpl( [], ) - React.useEffect(() => { - if (!onScroll) { - return - } - function handleScroll(e: any) { - ;(onScroll as any).current?.worklet({ - ...e.nativeEvent, - eventName: 'onScroll', - contentOffset: { - x: 0, - y: window.scrollY, - }, - }) - } - window.addEventListener('scroll', handleScroll) - return () => window.removeEventListener('scroll', handleScroll) - }, [onScroll]) - const onVisible = React.useCallback(() => { onEndReached?.({ distanceFromEnd: onEndReachedThreshold || 0,