Bluesky app fork with some witchin' additions 💫

Display second-to-last rather than second post in a slice (#4864)

authored by danabra.mov and committed by

GitHub 388c157c b0e130a4

+12 -11
+12 -11
src/view/com/posts/FeedSlice.tsx
··· 19 19 hideTopBorder?: boolean 20 20 }): React.ReactNode => { 21 21 if (slice.isThread && slice.items.length > 3) { 22 + const beforeLast = slice.items.length - 2 22 23 const last = slice.items.length - 1 23 24 return ( 24 25 <> ··· 36 37 hideTopBorder={hideTopBorder} 37 38 isParentBlocked={slice.items[0].isParentBlocked} 38 39 /> 40 + <ViewFullThread slice={slice} /> 39 41 <FeedItem 40 - key={slice.items[1]._reactKey} 41 - post={slice.items[1].post} 42 - record={slice.items[1].record} 43 - reason={slice.items[1].reason} 44 - feedContext={slice.items[1].feedContext} 45 - parentAuthor={slice.items[1].parentAuthor} 42 + key={slice.items[beforeLast]._reactKey} 43 + post={slice.items[beforeLast].post} 44 + record={slice.items[beforeLast].record} 45 + reason={slice.items[beforeLast].reason} 46 + feedContext={slice.items[beforeLast].feedContext} 47 + parentAuthor={slice.items[beforeLast].parentAuthor} 46 48 showReplyTo={false} 47 - moderation={slice.items[1].moderation} 48 - isThreadParent={isThreadParentAt(slice.items, 1)} 49 - isThreadChild={isThreadChildAt(slice.items, 1)} 50 - isParentBlocked={slice.items[1].isParentBlocked} 49 + moderation={slice.items[beforeLast].moderation} 50 + isThreadParent={isThreadParentAt(slice.items, beforeLast)} 51 + isThreadChild={isThreadChildAt(slice.items, beforeLast)} 52 + isParentBlocked={slice.items[beforeLast].isParentBlocked} 51 53 /> 52 - <ViewFullThread slice={slice} /> 53 54 <FeedItem 54 55 key={slice.items[last]._reactKey} 55 56 post={slice.items[last].post}