@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
import NoteCard from '@/components/NoteCard'
import ProfileSearchBar from '@/components/ui/ProfileSearchBar'
import { Skeleton } from '@/components/ui/skeleton'
import { ExtendedKind , PROFILE_POSTS_TAB_KINDS , PROFILE_PUBLICATIONS_TAB_KINDS } from '@/constants'
import { ExtendedKind , PROFILE_POSTS_TAB_KINDS } from '@/constants'
import { isReplyNoteEvent } from '@/lib/event'
import { getZapInfoFromEvent } from '@/lib/event-metadata'
import { useProfilePins } from '@/hooks/useProfilePins'
@ -54,7 +54,6 @@ const ProfileFeedWithPins = forwardRef<{ refresh: () => void }, { pubkey: string
@@ -54,7 +54,6 @@ const ProfileFeedWithPins = forwardRef<{ refresh: () => void }, { pubkey: string
return next . sort ( ( a , b ) = > a - b )
} , [ showKinds ] )
const hideReplies = useHideRepliesLikeMainFeed ( )
const publicationsKindSet = useMemo ( ( ) = > new Set ( PROFILE_PUBLICATIONS_TAB_KINDS ) , [ ] )
const [ searchQuery , setSearchQuery ] = useState ( '' )
const [ isRefreshing , setIsRefreshing ] = useState ( false )
const [ showCount , setShowCount ] = useState ( INITIAL_SHOW_COUNT )
@ -75,7 +74,11 @@ const ProfileFeedWithPins = forwardRef<{ refresh: () => void }, { pubkey: string
@@ -75,7 +74,11 @@ const ProfileFeedWithPins = forwardRef<{ refresh: () => void }, { pubkey: string
[ zapReplyThreshold ]
)
const cacheKey = useMemo ( ( ) = > ` ${ pubkey } -profile-unified- ${ zapReplyThreshold } ` , [ pubkey , zapReplyThreshold ] )
/** Bump when posts-tab `kinds` change so in-memory timeline cache is not reused across incompatible filters. */
const cacheKey = useMemo (
( ) = > ` ${ pubkey } -profile-posts-tab-v2- ${ zapReplyThreshold } ` ,
[ pubkey , zapReplyThreshold ]
)
const postsTabKinds = useMemo ( ( ) = > [ . . . PROFILE_POSTS_TAB_KINDS ] , [ ] )
@ -163,11 +166,8 @@ const ProfileFeedWithPins = forwardRef<{ refresh: () => void }, { pubkey: string
@@ -163,11 +166,8 @@ const ProfileFeedWithPins = forwardRef<{ refresh: () => void }, { pubkey: string
)
const filteredPins = useMemo (
( ) = >
applySearch ( pinEvents )
. filter ( ( e ) = > ! isEventDeleted ( e ) )
. filter ( ( e ) = > ! publicationsKindSet . has ( e . kind ) ) ,
[ pinEvents , applySearch , isEventDeleted , publicationsKindSet ]
( ) = > applySearch ( pinEvents ) . filter ( ( e ) = > ! isEventDeleted ( e ) ) ,
[ pinEvents , applySearch , isEventDeleted ]
)
const filteredRest = useMemo (
( ) = >