From 5b8631d1887a08aa746a2b832688873e8ce3b1f2 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Wed, 10 Sep 2025 18:49:04 +0300
Subject: Fix profile lists/feeds/starterpacks tabs position issue (#8935)

---
 src/components/StarterPack/ProfileStarterPacks.tsx | 44 ++++++++++------------
 1 file changed, 20 insertions(+), 24 deletions(-)

(limited to 'src/components/StarterPack/ProfileStarterPacks.tsx')

diff --git a/src/components/StarterPack/ProfileStarterPacks.tsx b/src/components/StarterPack/ProfileStarterPacks.tsx
index bbe0bc52b..7252a1162 100644
--- a/src/components/StarterPack/ProfileStarterPacks.tsx
+++ b/src/components/StarterPack/ProfileStarterPacks.tsx
@@ -1,13 +1,9 @@
-import React, {
-  useCallback,
-  useEffect,
-  useImperativeHandle,
-  useState,
-} from 'react'
+import {useCallback, useEffect, useImperativeHandle, useState} from 'react'
 import {
   findNodeHandle,
   type ListRenderItemInfo,
   type StyleProp,
+  useWindowDimensions,
   View,
   type ViewStyle,
 } from 'react-native'
@@ -42,6 +38,7 @@ interface SectionRef {
 }
 
 interface ProfileFeedgensProps {
+  ref?: React.Ref<SectionRef>
   scrollElRef: ListRef
   did: string
   headerOffset: number
@@ -56,24 +53,20 @@ function keyExtractor(item: AppBskyGraphDefs.StarterPackView) {
   return item.uri
 }
 
-export const ProfileStarterPacks = React.forwardRef<
-  SectionRef,
-  ProfileFeedgensProps
->(function ProfileFeedgensImpl(
-  {
-    scrollElRef,
-    did,
-    headerOffset,
-    enabled,
-    style,
-    testID,
-    setScrollViewTag,
-    isMe,
-  },
+export function ProfileStarterPacks({
   ref,
-) {
+  scrollElRef,
+  did,
+  headerOffset,
+  enabled,
+  style,
+  testID,
+  setScrollViewTag,
+  isMe,
+}: ProfileFeedgensProps) {
   const t = useTheme()
   const bottomBarOffset = useBottomBarOffset(100)
+  const {height} = useWindowDimensions()
   const [isPTRing, setIsPTRing] = useState(false)
   const {
     data,
@@ -101,7 +94,7 @@ export const ProfileStarterPacks = React.forwardRef<
     setIsPTRing(false)
   }, [refetch, setIsPTRing])
 
-  const onEndReached = React.useCallback(async () => {
+  const onEndReached = useCallback(async () => {
     if (isFetchingNextPage || !hasNextPage || isError) return
     try {
       await fetchNextPage()
@@ -144,7 +137,10 @@ export const ProfileStarterPacks = React.forwardRef<
         refreshing={isPTRing}
         headerOffset={headerOffset}
         progressViewOffset={ios(0)}
-        contentContainerStyle={{paddingBottom: headerOffset + bottomBarOffset}}
+        contentContainerStyle={{
+          minHeight: height + headerOffset,
+          paddingBottom: bottomBarOffset,
+        }}
         removeClippedSubviews={true}
         desktopFixedHeight
         onEndReached={onEndReached}
@@ -158,7 +154,7 @@ export const ProfileStarterPacks = React.forwardRef<
       />
     </View>
   )
-})
+}
 
 function CreateAnother() {
   const {_} = useLingui()
-- 
cgit 1.4.1

