mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 08:21:20 +00:00
Fix showing parents on notifications
This commit is contained in:
parent
64ecbf9ac1
commit
e51db5f343
@ -91,7 +91,7 @@
|
|||||||
const goToParent = () => {
|
const goToParent = () => {
|
||||||
router
|
router
|
||||||
.at("notes")
|
.at("notes")
|
||||||
.of(getParentId(note), {relays: tags.getReplyHints()})
|
.of(getParentId(event), {relays: tags.getReplyHints()})
|
||||||
.cx({context: ctx.concat(event)})
|
.cx({context: ctx.concat(event)})
|
||||||
.open()
|
.open()
|
||||||
}
|
}
|
||||||
@ -162,12 +162,12 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
const zapAddress = Tags.from(note).getValue("zap")
|
const zapAddress = Tags.from(event).getValue("zap")
|
||||||
|
|
||||||
if (zapAddress && getLnUrl(zapAddress)) {
|
if (zapAddress && getLnUrl(zapAddress)) {
|
||||||
zapper = await getZapper(getLnUrl(zapAddress))
|
zapper = await getZapper(getLnUrl(zapAddress))
|
||||||
} else {
|
} else {
|
||||||
unsubZapper = people.key(note.pubkey).subscribe($p => {
|
unsubZapper = people.key(event.pubkey).subscribe($p => {
|
||||||
zapper = $p?.zapper
|
zapper = $p?.zapper
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -214,8 +214,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if ready}
|
{#if ready}
|
||||||
{@const rootId = getRootId(note)}
|
{@const rootId = getRootId(event)}
|
||||||
{@const replyId = getParentId(note)}
|
{@const replyId = getParentId(event)}
|
||||||
{@const path = router
|
{@const path = router
|
||||||
.at("notes")
|
.at("notes")
|
||||||
.of(event.id, {relays: getEventHints(event)})
|
.of(event.id, {relays: getEventHints(event)})
|
||||||
@ -248,13 +248,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
{#if replyId && !getParentIds(note).includes(anchor) && showParent}
|
{#if replyId && !getParentIds(event).includes(anchor) && showParent}
|
||||||
<small class="text-gray-1">
|
<small class="text-gray-1">
|
||||||
<i class="fa fa-code-merge" />
|
<i class="fa fa-code-merge" />
|
||||||
<Anchor class="underline" on:click={goToParent}>View Parent</Anchor>
|
<Anchor class="underline" on:click={goToParent}>View Parent</Anchor>
|
||||||
</small>
|
</small>
|
||||||
{/if}
|
{/if}
|
||||||
{#if rootId && !getRootIds(note).includes(anchor) && rootId !== replyId && showParent}
|
{#if rootId && !getRootIds(event).includes(anchor) && rootId !== replyId && showParent}
|
||||||
<small class="text-gray-1">
|
<small class="text-gray-1">
|
||||||
<i class="fa fa-code-pull-request" />
|
<i class="fa fa-code-pull-request" />
|
||||||
<Anchor class="underline" on:click={goToThread}>View Thread</Anchor>
|
<Anchor class="underline" on:click={goToThread}>View Thread</Anchor>
|
||||||
|
Loading…
Reference in New Issue
Block a user