mirror of
https://github.com/dergigi/boris.git
synced 2026-01-25 17:54:45 +01:00
feat(highlights): increase fetch limits for better explore page coverage
- Increase friends highlights limit from 200 to 1000 - Add 1000 limit to nostrverse highlights on initial load - Ensures users see more highlights from friends and nostrverse - Incremental syncs continue to use 'since' filter without limit
This commit is contained in:
@@ -28,7 +28,7 @@ export const fetchHighlightsFromAuthors = async (
|
||||
const seenIds = new Set<string>()
|
||||
const rawEvents = await queryEvents(
|
||||
relayPool,
|
||||
{ kinds: [9802], authors: pubkeys, limit: 200 },
|
||||
{ kinds: [9802], authors: pubkeys, limit: 1000 },
|
||||
{
|
||||
onEvent: (event: NostrEvent) => {
|
||||
if (!seenIds.has(event.id)) {
|
||||
|
||||
@@ -89,8 +89,13 @@ class NostrverseHighlightsController {
|
||||
)
|
||||
|
||||
const lastSyncedAt = force ? null : this.getLastSyncedAt()
|
||||
const filter: { kinds: number[]; since?: number } = { kinds: [KINDS.Highlights] }
|
||||
if (lastSyncedAt) filter.since = lastSyncedAt
|
||||
const filter: { kinds: number[]; since?: number; limit?: number } = { kinds: [KINDS.Highlights] }
|
||||
if (lastSyncedAt) {
|
||||
filter.since = lastSyncedAt
|
||||
} else {
|
||||
// On initial load, fetch more highlights
|
||||
filter.limit = 1000
|
||||
}
|
||||
|
||||
const events = await queryEvents(
|
||||
relayPool,
|
||||
|
||||
Reference in New Issue
Block a user