From b491f76598ac1245e19e6a92502430c95ddb5c10 Mon Sep 17 00:00:00 2001 From: gsovereignty Date: Sat, 13 Apr 2024 17:54:44 +1200 Subject: [PATCH] problem: can't sort messages --- src/lib/components/Kind1.svelte | 83 ++++++++++++++++++++++++--------- src/lib/workers/firehose.ts | 14 +----- 2 files changed, 62 insertions(+), 35 deletions(-) diff --git a/src/lib/components/Kind1.svelte b/src/lib/components/Kind1.svelte index 5524269..2093fd1 100644 --- a/src/lib/components/Kind1.svelte +++ b/src/lib/components/Kind1.svelte @@ -1,24 +1,63 @@ -{#each treeItem.children as [id, tree], i (id)} -
- - profile pic - -
-{/each} \ No newline at end of file + +{#each t as [id, tree], i (id)} +
+ + profile pic + +
+{/each} diff --git a/src/lib/workers/firehose.ts b/src/lib/workers/firehose.ts index ea17210..bcdf6c7 100644 --- a/src/lib/workers/firehose.ts +++ b/src/lib/workers/firehose.ts @@ -25,7 +25,7 @@ const _ndk = writable( "wss://relay.primal.net", // "wss://pyramid.fiatjaf.com", ], - enableOutboxModel: false, + enableOutboxModel: true, }) ); @@ -39,9 +39,6 @@ const replaceableKinds = [0, 3]; const processedIdForKind: Record = {}; let responseStore: Writable | undefined; // = -// responseStore.subscribe((response) => { -// postMessage(response); -// }); function init(pubkey?: string) { if (!responseData) { @@ -59,15 +56,6 @@ function init(pubkey?: string) { updateEventMap(); }); - // let _masterFollows = writable(responseData.followLists.get(responseData.masterPubkey)) - // let masterFollows = derived(_masterFollows, ($mfs)=>{ - // if ($mfs) { - // return $mfs.size - // } else { - // return 0 - // } - // }) - let masterFollows = derived(responseStore, ($responseStore) =>{ if ($responseStore.masterPubkey) { return $responseStore.followLists.get($responseStore.masterPubkey)?.size