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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user