PostList do not scroll to bottom after the first onEndReached (#6109)

This commit is contained in:
Elias Nahum 2022-03-31 14:23:57 -03:00 committed by GitHub
parent 8cb0131e95
commit 7e09e5dc05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ const PostList = ({
useEffect(() => {
listRef.current?.scrollToOffset({offset: 0, animated: false});
}, [channelId, listRef.current]);
}, [channelId]);
useEffect(() => {
const scrollToBottom = (screen: string) => {
@ -352,7 +352,6 @@ const PostList = ({
keyboardShouldPersistTaps='handled'
keyExtractor={keyExtractor}
initialNumToRender={INITIAL_BATCH_TO_RENDER + 5}
listKey={`postList-${channelId}`}
ListFooterComponent={footer}
maintainVisibleContentPosition={SCROLL_POSITION_CONFIG}
maxToRenderPerBatch={10}