Re-work loading/syncing

This commit is contained in:
Jon Staab
2024-11-15 14:03:54 -08:00
parent 141e2bf835
commit 0deddc8a4c
24 changed files with 287 additions and 147 deletions
+9 -2
View File
@@ -1,12 +1,19 @@
<script lang="ts">
import {onMount} from "svelte"
import {deriveEvents} from "@welshman/store"
import {repository} from "@welshman/app"
import {repository, load} from "@welshman/app"
import Icon from "@lib/components/Icon.svelte"
import {COMMENT} from "@app/state"
export let event
export let relays: string[] = []
const replies = deriveEvents(repository, {filters: [{kinds: [COMMENT], "#E": [event.id]}]})
const filters = [{kinds: [COMMENT], "#E": [event.id]}]
const replies = deriveEvents(repository, {filters})
onMount(() => {
load({relays, filters})
})
</script>
{#if $replies.length > 0}