From 7431dfba4f0f2b34ef5a7b64cf611268d730252d Mon Sep 17 00:00:00 2001 From: Ahmed Soliman Date: Sat, 2 Nov 2024 00:57:33 -0400 Subject: [PATCH] Using min height for container style on feeds, packs, and lists tabs --- src/components/StarterPack/ProfileStarterPacks.tsx | 7 ++++--- src/view/com/feeds/ProfileFeedgens.tsx | 5 ++++- src/view/com/lists/ProfileLists.tsx | 7 ++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/StarterPack/ProfileStarterPacks.tsx b/src/components/StarterPack/ProfileStarterPacks.tsx index 00afbdcfe9..faa3c0b4f8 100644 --- a/src/components/StarterPack/ProfileStarterPacks.tsx +++ b/src/components/StarterPack/ProfileStarterPacks.tsx @@ -13,10 +13,10 @@ import {useNavigation} from '@react-navigation/native' import {InfiniteData, UseInfiniteQueryResult} from '@tanstack/react-query' import {useGenerateStarterPackMutation} from '#/lib/generate-starterpack' -import {useBottomBarOffset} from '#/lib/hooks/useBottomBarOffset' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {NavigationProp} from '#/lib/routes/types' import {parseStarterPackUri} from '#/lib/strings/starter-pack' +import {s} from '#/lib/styles' import {logger} from '#/logger' import {List, ListRef} from '#/view/com/util/List' import {Text} from '#/view/com/util/text/Text' @@ -68,7 +68,6 @@ export const ProfileStarterPacks = React.forwardRef< ref, ) { const t = useTheme() - const bottomBarOffset = useBottomBarOffset(100) const [isPTRing, setIsPTRing] = React.useState(false) const {data, refetch, isFetching, hasNextPage, fetchNextPage} = query const {isTabletOrDesktop} = useWebMediaQueries() @@ -133,7 +132,9 @@ export const ProfileStarterPacks = React.forwardRef< refreshing={isPTRing} headerOffset={headerOffset} progressViewOffset={ios(0)} - contentContainerStyle={{paddingBottom: headerOffset + bottomBarOffset}} + contentContainerStyle={{ + minHeight: s.window.height + headerOffset, + }} indicatorStyle={t.name === 'light' ? 'black' : 'white'} removeClippedSubviews={true} desktopFixedHeight diff --git a/src/view/com/feeds/ProfileFeedgens.tsx b/src/view/com/feeds/ProfileFeedgens.tsx index 693a8e361a..16e80573a6 100644 --- a/src/view/com/feeds/ProfileFeedgens.tsx +++ b/src/view/com/feeds/ProfileFeedgens.tsx @@ -11,6 +11,7 @@ import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' import {cleanError} from '#/lib/strings/errors' +import {s} from '#/lib/styles' import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' import {usePreferencesQuery} from '#/state/queries/preferences' @@ -192,7 +193,9 @@ export const ProfileFeedgens = React.forwardRef< onRefresh={onRefresh} headerOffset={headerOffset} progressViewOffset={ios(0)} - contentContainerStyle={isNative && {paddingBottom: headerOffset + 100}} + contentContainerStyle={{ + minHeight: s.window.height + headerOffset, + }} indicatorStyle={t.name === 'light' ? 'black' : 'white'} removeClippedSubviews={true} // @ts-ignore our .web version only -prf diff --git a/src/view/com/lists/ProfileLists.tsx b/src/view/com/lists/ProfileLists.tsx index 27b7f94df8..4167fc73ba 100644 --- a/src/view/com/lists/ProfileLists.tsx +++ b/src/view/com/lists/ProfileLists.tsx @@ -11,6 +11,7 @@ import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' import {cleanError} from '#/lib/strings/errors' +import {s} from '#/lib/styles' import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' import {RQKEY, useProfileListsQuery} from '#/state/queries/profile-lists' @@ -188,9 +189,9 @@ export const ProfileLists = React.forwardRef( onRefresh={onRefresh} headerOffset={headerOffset} progressViewOffset={ios(0)} - contentContainerStyle={ - isNative && {paddingBottom: headerOffset + 100} - } + contentContainerStyle={{ + minHeight: s.window.height + headerOffset, + }} indicatorStyle={t.name === 'light' ? 'black' : 'white'} removeClippedSubviews={true} // @ts-ignore our .web version only -prf