Skip to content

Commit

Permalink
Don't replace first post with pin if limit=1 (#2841)
Browse files Browse the repository at this point in the history
don't replace post if limit=1
  • Loading branch information
mozzius authored Oct 1, 2024
1 parent 4098d98 commit 023474c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/bsky/src/api/app/bsky/feed/getAuthorFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,9 @@ export const skeleton = async (inputs: {
},
authorPinned: true,
}
if (params.limit === 1) {
items[0] = pinnedItem
} else {
// filter pinned post from first page only
items = items.filter((item) => item.post.uri !== pinnedItem.post.uri)
items.unshift(pinnedItem)
}

items = items.filter((item) => item.post.uri !== pinnedItem.post.uri)
items.unshift(pinnedItem)
}

return {
Expand Down

0 comments on commit 023474c

Please sign in to comment.