Fix like popover

This commit is contained in:
Jonathan Staab 2022-12-23 16:57:33 -08:00
parent 4a47ea2dc9
commit 92d823f5b2
3 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ If you like Coracle and want to support its development, you can donate sats via
# Bugs
- [ ] lil janky
- [ ] Add alerts for replies to posts the user liked
- [ ] With link/image previews, remove the url from the note body if it's on a separate last line
- [ ] Stack views so scroll position isn't lost on navigation

View File

@ -34,8 +34,8 @@
<div transition:fly={{y: 20}} class="fixed inset-0 z-10" on:click={closePopover} />
<div
transition:fly={{y: 20}}
class="absolute bottom-0 -ml-3 mb-12 py-2 px-4 rounded border border-solid border-medium
bg-dark grid grid-cols-3 gap-y-2 gap-x-4 z-10">
class="absolute top-0 mt-8 py-2 px-4 rounded border border-solid border-medium
bg-dark grid grid-cols-3 gap-y-2 gap-x-4 z-20">
{#each note.people as person (person.pubkey)}
<Badge {person} />
{/each}

View File

@ -82,7 +82,7 @@
// Combine likes of a single note
const likesById = {}
const alerts = notes.filter(e => e.pubkey !== $user.pubkey)
for (const reaction of reactions) {
for (const reaction of reactions.filter(prop('parent'))) {
if (!likesById[reaction.parent.id]) {
likesById[reaction.parent.id] = {...reaction.parent, people: []}
}