feat: reduce picture event load limit

This commit is contained in:
codytseng
2025-01-07 23:56:05 +08:00
parent 7bd5b915eb
commit 5ffbb8ed70

View File

@@ -17,6 +17,7 @@ import SimpleMasonryGrid from '../SimpleMasonryGrid'
const NORMAL_RELAY_LIMIT = 100 const NORMAL_RELAY_LIMIT = 100
const ALGO_RELAY_LIMIT = 500 const ALGO_RELAY_LIMIT = 500
const PICTURE_NOTE_LIMIT = 30
type TListMode = 'posts' | 'postsAndReplies' | 'pictures' type TListMode = 'posts' | 'postsAndReplies' | 'pictures'
@@ -46,7 +47,7 @@ export default function NoteList({
if (isPictures) { if (isPictures) {
return { return {
kinds: [PICTURE_EVENT_KIND], kinds: [PICTURE_EVENT_KIND],
limit: areAlgoRelays ? ALGO_RELAY_LIMIT : NORMAL_RELAY_LIMIT, limit: PICTURE_NOTE_LIMIT,
...filter ...filter
} }
} }