Use new filter for Posts tab on profile (#2150)

* Use new filter for Posts tab on profile

* Update deps

* Remove log
This commit is contained in:
Eric Bailey
2023-12-08 18:29:53 -06:00
committed by GitHub
parent e1b1720cad
commit 9c0c18d5d0
6 changed files with 35 additions and 117 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ export class AuthorFeedAPI implements FeedAPI {
}
_filter(feed: AppBskyFeedDefs.FeedViewPost[]) {
if (this.params.filter === 'posts_no_replies') {
if (this.params.filter === 'posts_and_author_threads') {
return feed.filter(post => {
const isReply = post.reply
const isRepost = AppBskyFeedDefs.isReasonRepost(post.reason)
+1
View File
@@ -35,6 +35,7 @@ type ActorDid = string
type AuthorFilter =
| 'posts_with_replies'
| 'posts_no_replies'
| 'posts_and_author_threads'
| 'posts_with_media'
type FeedUri = string
type ListUri = string
+1 -1
View File
@@ -121,7 +121,7 @@ let Feed = ({
data?.pages.length === 1 &&
(feed === 'following' ||
feed === 'home' ||
feed === `author|${myDid}|posts_no_replies`)
feed === `author|${myDid}|posts_and_author_threads`)
) {
queryClient.invalidateQueries({queryKey: RQKEY(feed)})
}
+1 -1
View File
@@ -280,7 +280,7 @@ function ProfileScreenLoaded({
{({onScroll, headerHeight, isFocused, isScrolledDown, scrollElRef}) => (
<FeedSection
ref={postsSectionRef}
feed={`author|${profile.did}|posts_no_replies`}
feed={`author|${profile.did}|posts_and_author_threads`}
onScroll={onScroll}
headerHeight={headerHeight}
isFocused={isFocused}