diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-05-06 23:07:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-06 23:07:48 +0300 |
commit | d1ec73a28968a5fa290c37f49512c20117da12d8 (patch) | |
tree | 40ec88c6e9d6c49c55d4739b28593dccfe3bacb3 /src/view/com/lists | |
parent | 433fa33b27c46d978388e0034d832c133a37d0b9 (diff) | |
download | voidsky-d1ec73a28968a5fa290c37f49512c20117da12d8.tar.zst |
hide footer when lists list is empty (#8337)
Diffstat (limited to 'src/view/com/lists')
-rw-r--r-- | src/view/com/lists/ProfileLists.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/view/com/lists/ProfileLists.tsx b/src/view/com/lists/ProfileLists.tsx index e264bd6c6..8fea51081 100644 --- a/src/view/com/lists/ProfileLists.tsx +++ b/src/view/com/lists/ProfileLists.tsx @@ -178,6 +178,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>( }, [enabled, scrollElRef, setScrollViewTag]) const ProfileListsFooter = React.useCallback(() => { + if (isEmpty) return null return ( <ListFooter hasNextPage={hasNextPage} @@ -187,7 +188,14 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>( height={180 + headerOffset} /> ) - }, [hasNextPage, error, isFetchingNextPage, headerOffset, fetchNextPage]) + }, [ + hasNextPage, + error, + isFetchingNextPage, + headerOffset, + fetchNextPage, + isEmpty, + ]) return ( <View testID={testID} style={style}> |