From 52425f842ea49e2a0895d5010249e594e2a66f88 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 29 Aug 2025 11:22:55 +0100 Subject: [PATCH] set minheight of content container to screen height + header --- src/components/StarterPack/ProfileStarterPacks.tsx | 7 ++++++- src/view/com/feeds/ProfileFeedgens.tsx | 3 +++ src/view/com/lists/ProfileLists.tsx | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/StarterPack/ProfileStarterPacks.tsx b/src/components/StarterPack/ProfileStarterPacks.tsx index 6e10ca47b6..b0e9a7e854 100644 --- a/src/components/StarterPack/ProfileStarterPacks.tsx +++ b/src/components/StarterPack/ProfileStarterPacks.tsx @@ -3,6 +3,7 @@ import { findNodeHandle, type ListRenderItemInfo, type StyleProp, + useWindowDimensions, View, type ViewStyle, } from 'react-native' @@ -65,6 +66,7 @@ export function ProfileStarterPacks({ }: ProfileFeedgensProps) { const t = useTheme() const bottomBarOffset = useBottomBarOffset(100) + const {height} = useWindowDimensions() const [isPTRing, setIsPTRing] = useState(false) const { data, @@ -135,7 +137,10 @@ export function ProfileStarterPacks({ refreshing={isPTRing} headerOffset={headerOffset} progressViewOffset={ios(0)} - contentContainerStyle={{paddingBottom: headerOffset + bottomBarOffset}} + contentContainerStyle={{ + minHeight: height + headerOffset, + paddingBottom: bottomBarOffset, + }} removeClippedSubviews={true} desktopFixedHeight onEndReached={onEndReached} diff --git a/src/view/com/feeds/ProfileFeedgens.tsx b/src/view/com/feeds/ProfileFeedgens.tsx index f5ab8b8e9a..f53a5f5dfe 100644 --- a/src/view/com/feeds/ProfileFeedgens.tsx +++ b/src/view/com/feeds/ProfileFeedgens.tsx @@ -9,6 +9,7 @@ import { findNodeHandle, type ListRenderItemInfo, type StyleProp, + useWindowDimensions, View, type ViewStyle, } from 'react-native' @@ -63,6 +64,7 @@ export function ProfileFeedgens({ const {_} = useLingui() const t = useTheme() const [isPTRing, setIsPTRing] = useState(false) + const {height} = useWindowDimensions() const opts = useMemo(() => ({enabled}), [enabled]) const { data, @@ -227,6 +229,7 @@ export function ProfileFeedgens({ removeClippedSubviews={true} desktopFixedHeight onEndReached={onEndReached} + contentContainerStyle={{minHeight: height + headerOffset}} /> ) diff --git a/src/view/com/lists/ProfileLists.tsx b/src/view/com/lists/ProfileLists.tsx index 3c46aaf8d9..ce51cb3375 100644 --- a/src/view/com/lists/ProfileLists.tsx +++ b/src/view/com/lists/ProfileLists.tsx @@ -9,6 +9,7 @@ import { findNodeHandle, type ListRenderItemInfo, type StyleProp, + useWindowDimensions, View, type ViewStyle, } from 'react-native' @@ -61,6 +62,7 @@ export function ProfileLists({ }: ProfileListsProps) { const t = useTheme() const {_} = useLingui() + const {height} = useWindowDimensions() const [isPTRing, setIsPTRing] = useState(false) const opts = useMemo(() => ({enabled}), [enabled]) const { @@ -222,6 +224,7 @@ export function ProfileLists({ removeClippedSubviews={true} desktopFixedHeight onEndReached={onEndReached} + contentContainerStyle={{minHeight: height + headerOffset}} /> )