feat: favorite relays (#250)

This commit is contained in:
Cody Tseng 2025-04-05 15:31:34 +08:00 committed by GitHub
parent fab9ff88b5
commit c739d9d28c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 1081 additions and 982 deletions

View file

@ -1,6 +1,6 @@
import { Button } from '@/components/ui/button'
import { Skeleton } from '@/components/ui/skeleton'
import { PICTURE_EVENT_KIND } from '@/constants'
import { ExtendedKind } from '@/constants'
import { isReplyNoteEvent } from '@/lib/event'
import { checkAlgoRelay } from '@/lib/relay'
import { cn } from '@/lib/utils'
@ -53,7 +53,7 @@ export default function NoteList({
const isPictures = useMemo(() => listMode === 'pictures', [listMode])
const noteFilter = useMemo(() => {
return {
kinds: isPictures ? [PICTURE_EVENT_KIND] : [kinds.ShortTextNote, kinds.Repost],
kinds: isPictures ? [ExtendedKind.PICTURE] : [kinds.ShortTextNote, kinds.Repost],
...filter
}
}, [JSON.stringify(filter), isPictures])