From e51db5f343b6da37f542b5f164c991cf01b6cf97 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Fri, 8 Dec 2023 08:52:44 -0800 Subject: [PATCH] Fix showing parents on notifications --- src/app/shared/Note.svelte | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/shared/Note.svelte b/src/app/shared/Note.svelte index a0c59667..1af43f65 100644 --- a/src/app/shared/Note.svelte +++ b/src/app/shared/Note.svelte @@ -91,7 +91,7 @@ const goToParent = () => { router .at("notes") - .of(getParentId(note), {relays: tags.getReplyHints()}) + .of(getParentId(event), {relays: tags.getReplyHints()}) .cx({context: ctx.concat(event)}) .open() } @@ -162,12 +162,12 @@ ) onMount(async () => { - const zapAddress = Tags.from(note).getValue("zap") + const zapAddress = Tags.from(event).getValue("zap") if (zapAddress && getLnUrl(zapAddress)) { zapper = await getZapper(getLnUrl(zapAddress)) } else { - unsubZapper = people.key(note.pubkey).subscribe($p => { + unsubZapper = people.key(event.pubkey).subscribe($p => { zapper = $p?.zapper }) } @@ -214,8 +214,8 @@ {#if ready} - {@const rootId = getRootId(note)} - {@const replyId = getParentId(note)} + {@const rootId = getRootId(event)} + {@const replyId = getParentId(event)} {@const path = router .at("notes") .of(event.id, {relays: getEventHints(event)}) @@ -248,13 +248,13 @@
- {#if replyId && !getParentIds(note).includes(anchor) && showParent} + {#if replyId && !getParentIds(event).includes(anchor) && showParent} View Parent {/if} - {#if rootId && !getRootIds(note).includes(anchor) && rootId !== replyId && showParent} + {#if rootId && !getRootIds(event).includes(anchor) && rootId !== replyId && showParent} View Thread