From c41e68b149b8ad1b74552010f770460d85d49167 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 21 Jan 2025 17:01:04 -0600 Subject: [PATCH] Modify sourceContext for author feeds --- src/view/com/posts/PostFeed.tsx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index 0afc7f61ae..64c6026a0e 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -38,6 +38,7 @@ import {useProgressGuide} from '#/state/shell/progress-guide' import {List, ListRef} from '#/view/com/util/List' import {PostFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn' +import {VideoFeedSourceContext} from '#/screens/VideoFeed/types' import {useBreakpoints} from '#/alf' import {ProgressGuide, SuggestedFollows} from '#/components/FeedInterstitials' import { @@ -646,14 +647,25 @@ let PostFeed = ({ ) } else if (row.type === 'videoGridRow') { + let sourceContext: VideoFeedSourceContext = { + type: 'feedgen', + uri: row.sourceFeedUri, + sourceInterstitial: feedCacheKey ?? 'none', + } + + if (feedType === 'author') { + sourceContext = { + type: 'author', + did: feedUri, + filter: feedTab as any, + sourceInterstitial: 'none', + } + } + return ( ) } else { @@ -668,7 +680,9 @@ let PostFeed = ({ savedFeedConfig, _, onPressRetryLoadMore, + feedType, feedUri, + feedTab, feedCacheKey, ], )