File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/shared/components/event/reactions Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {useUserStore} from "@/stores/user"
1010import Icon from "../../Icons/Icon"
1111
1212import NoteCreator from "@/shared/components/create/NoteCreator.tsx"
13- import { getEventReplyingTo } from "@/utils/nostr"
13+ import { getEventReplyingTo , getEventRoot } from "@/utils/nostr"
1414import { LRUCache } from "typescript-lru-cache"
1515import { KIND_TEXT_NOTE } from "@/utils/constants"
1616
@@ -56,8 +56,9 @@ function FeedItemComment({event, showReactionCounts = true}: FeedItemCommentProp
5656 const sub = ndk ( ) . subscribe ( filter )
5757
5858 sub ?. on ( "event" , ( e : NDKEvent ) => {
59- if ( shouldHideAuthor ( e . author . pubkey ) || getEventReplyingTo ( e ) !== event . id )
60- return
59+ if ( shouldHideAuthor ( e . author . pubkey ) ) return
60+ // Count if this event is either replying to the current event or has it as root
61+ if ( getEventReplyingTo ( e ) !== event . id && getEventRoot ( e ) !== event . id ) return
6162 replies . add ( e . id )
6263 debouncedSetReplyCount ( replies . size )
6364 } )
You can’t perform that action at this time.
0 commit comments