Fix list loading in feeds hanging and pagination in feeds with since/until
This commit is contained in:
+2
-3
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman",
|
"name": "@welshman",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"docs": "typedoc && vitepress build docs",
|
"docs": "typedoc && vitepress build docs",
|
||||||
"prepare": "husky",
|
"prepare": "husky"
|
||||||
"apply-version": "./scripts/apply_version.sh"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "~9.23.0",
|
"@eslint/js": "~9.23.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/app",
|
"name": "@welshman/app",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A collection of svelte stores for use in building nostr client applications.",
|
"description": "A collection of svelte stores for use in building nostr client applications.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/content",
|
"name": "@welshman/content",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A collection of utilities for parsing nostr note content.",
|
"description": "A collection of utilities for parsing nostr note content.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/editor",
|
"name": "@welshman/editor",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A batteries-included nostr editor.",
|
"description": "A batteries-included nostr editor.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/feeds",
|
"name": "@welshman/feeds",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "Utilities for building dynamic nostr feeds.",
|
"description": "Utilities for building dynamic nostr feeds.",
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ export class FeedCompiler {
|
|||||||
const eventsByAddress = new Map<string, TrustedEvent>()
|
const eventsByAddress = new Map<string, TrustedEvent>()
|
||||||
|
|
||||||
await requestPage({
|
await requestPage({
|
||||||
|
autoClose: true,
|
||||||
signal: this.options.signal,
|
signal: this.options.signal,
|
||||||
context: this.options.context,
|
context: this.options.context,
|
||||||
filters: getIdFilters(addresses),
|
filters: getIdFilters(addresses),
|
||||||
@@ -302,9 +303,10 @@ export class FeedCompiler {
|
|||||||
await Promise.all(
|
await Promise.all(
|
||||||
labelItems.map(({mappings, relays, ...filter}) =>
|
labelItems.map(({mappings, relays, ...filter}) =>
|
||||||
requestPage({
|
requestPage({
|
||||||
|
relays,
|
||||||
|
autoClose: true,
|
||||||
signal: this.options.signal,
|
signal: this.options.signal,
|
||||||
context: this.options.context,
|
context: this.options.context,
|
||||||
relays,
|
|
||||||
filters: [{kinds: [1985], ...filter}],
|
filters: [{kinds: [1985], ...filter}],
|
||||||
onEvent: (e: TrustedEvent) => events.push(e),
|
onEvent: (e: TrustedEvent) => events.push(e),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export class FeedController {
|
|||||||
return filterSince < until && filterUntil > since
|
return filterSince < until && filterUntil > since
|
||||||
})
|
})
|
||||||
// Modify the filters to define our window
|
// Modify the filters to define our window
|
||||||
.map((filter: Filter) => ({...filter, until, limit, since}))
|
.map((filter: Filter) => ({since, until, limit, ...filter}))
|
||||||
|
|
||||||
if (requestFilters.length === 0) {
|
if (requestFilters.length === 0) {
|
||||||
return onExhausted?.()
|
return onExhausted?.()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/lib",
|
"name": "@welshman/lib",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A collection of utilities.",
|
"description": "A collection of utilities.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/net",
|
"name": "@welshman/net",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "Utilities for connecting with nostr relays.",
|
"description": "Utilities for connecting with nostr relays.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/relay",
|
"name": "@welshman/relay",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "An in-memory nostr relay implementation.",
|
"description": "An in-memory nostr relay implementation.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/router",
|
"name": "@welshman/router",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A collection of utilities for nostr relay selection.",
|
"description": "A collection of utilities for nostr relay selection.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/signer",
|
"name": "@welshman/signer",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A nostr signer implemenation supporting several login methods.",
|
"description": "A nostr signer implemenation supporting several login methods.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/store",
|
"name": "@welshman/store",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A collection of utilities based on svelte/store for use with welshman",
|
"description": "A collection of utilities based on svelte/store for use with welshman",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@welshman/util",
|
"name": "@welshman/util",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"author": "hodlbod",
|
"author": "hodlbod",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A collection of nostr-related utilities.",
|
"description": "A collection of nostr-related utilities.",
|
||||||
|
|||||||
Reference in New Issue
Block a user