feat: 💨

This commit is contained in:
codytseng
2025-11-20 21:31:48 +08:00
parent ce72098175
commit 18ae2a5fd4
4 changed files with 17 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { getEventKey, getKeyFromTag, getParentTag } from '@/lib/event'
import { getEventKey, getKeyFromTag, getParentTag, isReplyNoteEvent } from '@/lib/event'
import { Event } from 'nostr-tools'
import { createContext, useCallback, useContext, useState } from 'react'
@@ -26,6 +26,8 @@ export function ReplyProvider({ children }: { children: React.ReactNode }) {
const newReplyKeySet = new Set<string>()
const newReplyEventMap = new Map<string, Event[]>()
replies.forEach((reply) => {
if (!isReplyNoteEvent(reply)) return
const key = getEventKey(reply)
if (newReplyKeySet.has(key)) return
newReplyKeySet.add(key)