Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

show video feeds from posts even if they are replies (#7516)

* show video feeds from posts even if they are replies

* only show feed post in VideoFeed

authored by

Chris Kanich and committed by
GitHub
8e00f044 45b5af60

+14 -5
+2
src/lib/api/feed-manip.ts
··· 41 41 isFallbackMarker: boolean 42 42 isOrphan: boolean 43 43 rootUri: string 44 + feedPostUri: string 44 45 45 46 constructor(feedPost: FeedViewPost) { 46 47 const {post, reply, reason} = feedPost ··· 48 49 this.isIncompleteThread = false 49 50 this.isFallbackMarker = false 50 51 this.isOrphan = false 52 + this.feedPostUri = post.uri 51 53 if (AppBskyFeedDefs.isPostView(reply?.root)) { 52 54 this.rootUri = reply.root.uri 53 55 } else {
+7 -4
src/screens/VideoFeed/index.tsx
··· 206 206 feedContext: string | undefined 207 207 }[] = [] 208 208 for (const slice of page.slices) { 209 - for (const i of slice.items) { 209 + const feedPost = slice.items.find( 210 + item => item.uri === slice.feedPostUri, 211 + ) 212 + if (feedPost) { 210 213 items.push({ 211 - _reactKey: i._reactKey, 212 - moderation: i.moderation, 213 - post: i.post, 214 + _reactKey: feedPost._reactKey, 215 + moderation: feedPost.moderation, 216 + post: feedPost.post, 214 217 feedContext: slice.feedContext, 215 218 }) 216 219 }
+2
src/state/queries/post-feed.ts
··· 89 89 isIncompleteThread: boolean 90 90 isFallbackMarker: boolean 91 91 feedContext: string | undefined 92 + feedPostUri: string 92 93 reason?: 93 94 | AppBskyFeedDefs.ReasonRepost 94 95 | AppBskyFeedDefs.ReasonPin ··· 330 331 isFallbackMarker: slice.isFallbackMarker, 331 332 feedContext: slice.feedContext, 332 333 reason: slice.reason, 334 + feedPostUri: slice.feedPostUri, 333 335 items: slice.items.map((item, i) => { 334 336 const feedPostSliceItem: FeedPostSliceItem = { 335 337 _reactKey: `${slice._reactKey}-${i}-${item.post.uri}`,
+3 -1
src/view/com/posts/PostFeed.tsx
··· 347 347 }[] = [] 348 348 for (const page of data.pages) { 349 349 for (const slice of page.slices) { 350 - const item = slice.items.at(0) 350 + const item = slice.items.find( 351 + item => item.uri === slice.feedPostUri, 352 + ) 351 353 if (item && AppBskyEmbedVideo.isView(item.post.embed)) { 352 354 videos.push({item, feedContext: slice.feedContext}) 353 355 }