diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index 64c6026a0e..0ecd10fc03 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -25,6 +25,7 @@ import {useFeedFeedbackContext} from '#/state/feed-feedback' import {useTrendingSettings} from '#/state/preferences/trending' import {STALE} from '#/state/queries' import { + AuthorFilter, FeedDescriptor, FeedParams, FeedPostSlice, @@ -195,7 +196,7 @@ let PostFeed = ({ const [isPTRing, setIsPTRing] = React.useState(false) const checkForNewRef = React.useRef<(() => void) | null>(null) const lastFetchRef = React.useRef(Date.now()) - const [feedType, feedUri, feedTab] = feed.split('|') + const [feedType, feedUriOrActorDid, feedTab] = feed.split('|') const {gtMobile, gtTablet} = useBreakpoints() const areVideoFeedsEnabled = isNative @@ -308,7 +309,7 @@ let PostFeed = ({ let feedKind: 'following' | 'discover' | 'profile' | 'thevids' | undefined if (feedType === 'following') { feedKind = 'following' - } else if (feedUri === DISCOVER_FEED_URI) { + } else if (feedUriOrActorDid === DISCOVER_FEED_URI) { feedKind = 'discover' } else if ( feedType === 'author' && @@ -319,7 +320,7 @@ let PostFeed = ({ } let arr: FeedRow[] = [] - if (KNOWN_SHUTDOWN_FEEDS.includes(feedUri)) { + if (KNOWN_SHUTDOWN_FEEDS.includes(feedUriOrActorDid)) { arr.push({ type: 'feedShutdownMsg', key: 'feedShutdownMsg', @@ -377,7 +378,7 @@ let PostFeed = ({ type: 'videoGridRow', key: row.map(r => r.item._reactKey).join('-'), items: row.map(r => r.item), - sourceFeedUri: feedUri, + sourceFeedUri: feedUriOrActorDid, feedContexts: row.map(r => r.feedContext), }) } @@ -505,7 +506,7 @@ let PostFeed = ({ lastFetchedAt, data, feedType, - feedUri, + feedUriOrActorDid, feedTab, hasSession, showProgressIntersitial, @@ -596,7 +597,7 @@ let PostFeed = ({ } else if (row.type === 'loading') { return } else if (row.type === 'feedShutdownMsg') { - return + return } else if (row.type === 'interstitialFollows') { return } else if (row.type === 'interstitialProgressGuide') { @@ -656,8 +657,8 @@ let PostFeed = ({ if (feedType === 'author') { sourceContext = { type: 'author', - did: feedUri, - filter: feedTab as any, + did: feedUriOrActorDid, + filter: feedTab as AuthorFilter, sourceInterstitial: 'none', } } @@ -681,7 +682,7 @@ let PostFeed = ({ _, onPressRetryLoadMore, feedType, - feedUri, + feedUriOrActorDid, feedTab, feedCacheKey, ],