Make containers tall enough to avoid jumps

This commit is contained in:
Dan Abramov
2023-11-10 03:58:23 +00:00
parent a3c14b8108
commit ace173c518
3 changed files with 13 additions and 6 deletions
+4 -2
View File
@@ -2,6 +2,7 @@ import React, {MutableRefObject} from 'react'
import {observer} from 'mobx-react-lite'
import {
ActivityIndicator,
Dimensions,
RefreshControl,
StyleProp,
StyleSheet,
@@ -15,7 +16,6 @@ import {PostsFeedModel} from 'state/models/feeds/posts'
import {FeedSlice} from './FeedSlice'
import {LoadMoreRetryBtn} from '../util/LoadMoreRetryBtn'
import {OnScrollCb} from 'lib/hooks/useOnMainScroll'
import {s} from 'lib/styles'
import {useAnalytics} from 'lib/analytics/analytics'
import {usePalette} from 'lib/hooks/usePalette'
import {useTheme} from 'lib/ThemeContext'
@@ -176,7 +176,9 @@ export const Feed = observer(function Feed({
progressViewOffset={headerOffset}
/>
}
contentContainerStyle={s.contentContainer}
contentContainerStyle={{
paddingBottom: Dimensions.get('window').height - headerOffset,
}}
style={{paddingTop: headerOffset}}
onScroll={onScroll}
scrollEventThrottle={scrollEventThrottle}