diff --git a/src/components/List/index.tsx b/src/components/List/index.tsx index ae696b3df4..a3ba87eabe 100644 --- a/src/components/List/index.tsx +++ b/src/components/List/index.tsx @@ -5,6 +5,7 @@ import Animated, { useAnimatedScrollHandler, } from 'react-native-reanimated' +import {useLightbox} from '#/state/lightbox' import {atoms as a, useTheme, web} from '#/alf' import {useListScrollContext} from '#/components/List/ListScrollProvider' @@ -41,6 +42,7 @@ export const List = forwardRef(function List( ref: React.Ref>, ) { const t = useTheme() + const {activeLightbox} = useLightbox() const scrollHandlers = useListScrollContext() const onScroll = useAnimatedScrollHandler({ onScroll(e, ctx) { @@ -126,6 +128,7 @@ export const List = forwardRef(function List( contentOffset={ props.headerOffset ? {x: 0, y: props.headerOffset * -1} : undefined } + scrollsToTop={!activeLightbox} {...(props as FlatListPropsWithLayout)} style={[ /*