Add default feed loader to app

This commit is contained in:
Jon Staab
2024-10-09 09:48:08 -07:00
parent cabeba4533
commit 6e24f49384
9 changed files with 112 additions and 7 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import {inc, max, min, now} from '@welshman/lib'
import {inc, omitVals, max, min, now} from '@welshman/lib'
import type {TrustedEvent, Filter} from '@welshman/util'
import {EPOCH, trimFilters, guessFilterDelta} from '@welshman/util'
import type {Feed, RequestItem, FeedOptions} from './core'
@@ -98,7 +98,7 @@ export class FeedLoader {
let count = 0
await this.options.request({
await this.options.request(omitVals([undefined], {
relays,
filters: trimFilters(requestFilters),
onEvent: (event: TrustedEvent) => {
@@ -106,7 +106,7 @@ export class FeedLoader {
until = Math.min(until, event.created_at - 1)
onEvent?.(event)
},
})
}))
if (useWindowing) {
if (since === minSince) {