Add videos tab to profile (#7517)

* Add videos tab to profile

* Modify sourceContext for author feeds

* Use actual typecast, better name for feedUri

* Make EOF conditional

* Clearer condition

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
Eric Bailey
2025-01-21 18:45:33 -06:00
committed by GitHub
parent 1403570a6a
commit 6538013484
4 changed files with 54 additions and 13 deletions
+3 -1
View File
@@ -45,6 +45,7 @@ export const ProfileFeedSection = React.forwardRef<
const [hasNew, setHasNew] = React.useState(false)
const [isScrolledDown, setIsScrolledDown] = React.useState(false)
const shouldUseAdjustedNumToRender = feed.endsWith('posts_and_author_threads')
const isVideoFeed = isNative && feed.endsWith('posts_with_video')
const adjustedInitialNumToRender = useInitialNumToRender({
screenHeightOffset: headerHeight,
})
@@ -84,11 +85,12 @@ export const ProfileFeedSection = React.forwardRef<
renderEmptyState={renderPostsEmpty}
headerOffset={headerHeight}
progressViewOffset={ios(0)}
renderEndOfFeed={ProfileEndOfFeed}
renderEndOfFeed={isVideoFeed ? undefined : ProfileEndOfFeed}
ignoreFilterFor={ignoreFilterFor}
initialNumToRender={
shouldUseAdjustedNumToRender ? adjustedInitialNumToRender : undefined
}
isVideoFeed={isVideoFeed}
/>
{(isScrolledDown || hasNew) && (
<LoadLatestBtn