Modify sourceContext for author feeds
This commit is contained in:
@@ -38,6 +38,7 @@ import {useProgressGuide} from '#/state/shell/progress-guide'
|
|||||||
import {List, ListRef} from '#/view/com/util/List'
|
import {List, ListRef} from '#/view/com/util/List'
|
||||||
import {PostFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
import {PostFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
||||||
import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn'
|
import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn'
|
||||||
|
import {VideoFeedSourceContext} from '#/screens/VideoFeed/types'
|
||||||
import {useBreakpoints} from '#/alf'
|
import {useBreakpoints} from '#/alf'
|
||||||
import {ProgressGuide, SuggestedFollows} from '#/components/FeedInterstitials'
|
import {ProgressGuide, SuggestedFollows} from '#/components/FeedInterstitials'
|
||||||
import {
|
import {
|
||||||
@@ -646,14 +647,25 @@ let PostFeed = ({
|
|||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
} else if (row.type === 'videoGridRow') {
|
} 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 (
|
return (
|
||||||
<PostFeedVideoGridRow
|
<PostFeedVideoGridRow
|
||||||
items={row.items}
|
items={row.items}
|
||||||
sourceContext={{
|
sourceContext={sourceContext}
|
||||||
type: 'feedgen',
|
|
||||||
uri: row.sourceFeedUri,
|
|
||||||
sourceInterstitial: feedCacheKey ?? 'none',
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@@ -668,7 +680,9 @@ let PostFeed = ({
|
|||||||
savedFeedConfig,
|
savedFeedConfig,
|
||||||
_,
|
_,
|
||||||
onPressRetryLoadMore,
|
onPressRetryLoadMore,
|
||||||
|
feedType,
|
||||||
feedUri,
|
feedUri,
|
||||||
|
feedTab,
|
||||||
feedCacheKey,
|
feedCacheKey,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user