Hotfix feed sizing (#510)
* Fix home feed sizing on web * Bump api@0.2.8
This commit is contained in:
parent
38eb299011
commit
bbc2ab334d
4 changed files with 19 additions and 6 deletions
|
@ -179,6 +179,8 @@ export const Feed = observer(function Feed({
|
|||
onEndReachedThreshold={0.6}
|
||||
removeClippedSubviews={true}
|
||||
contentOffset={{x: 0, y: headerOffset * -1}}
|
||||
// @ts-ignore our .web version only -prf
|
||||
desktopFixedHeight
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
|
|
|
@ -25,6 +25,10 @@ import {
|
|||
import {addStyle, colors} from 'lib/styles'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
|
||||
interface AddedProps {
|
||||
desktopFixedHeight?: boolean
|
||||
}
|
||||
|
||||
export function CenteredView({
|
||||
style,
|
||||
...props
|
||||
|
@ -38,8 +42,9 @@ export const FlatList = React.forwardRef(function <ItemT>(
|
|||
contentContainerStyle,
|
||||
style,
|
||||
contentOffset,
|
||||
desktopFixedHeight,
|
||||
...props
|
||||
}: React.PropsWithChildren<FlatListProps<ItemT>>,
|
||||
}: React.PropsWithChildren<FlatListProps<ItemT> & AddedProps>,
|
||||
ref: React.Ref<RNFlatList>,
|
||||
) {
|
||||
const pal = usePalette('default')
|
||||
|
@ -60,6 +65,9 @@ export const FlatList = React.forwardRef(function <ItemT>(
|
|||
paddingTop: Math.abs(contentOffset.y),
|
||||
})
|
||||
}
|
||||
if (desktopFixedHeight) {
|
||||
style = addStyle(style, styles.fixedHeight)
|
||||
}
|
||||
return (
|
||||
<RNFlatList
|
||||
ref={ref}
|
||||
|
@ -122,4 +130,7 @@ const styles = StyleSheet.create({
|
|||
containerDark: {
|
||||
backgroundColor: colors.gray7,
|
||||
},
|
||||
fixedHeight: {
|
||||
height: '100vh',
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue