Don't show flags on likes page

This commit is contained in:
Jonathan Staab 2023-02-27 14:25:09 -06:00
parent 64f45e5f2f
commit 0570ad60ad
2 changed files with 9 additions and 2 deletions

View File

@ -15,6 +15,7 @@
export let filter
export let relays = []
export let shouldDisplay = null
let notes = []
let notesBuffer = []
@ -26,6 +27,10 @@
const processNewNotes = async newNotes => {
newNotes = user.muffle(newNotes)
if (shouldDisplay) {
newNotes = newNotes.filter(shouldDisplay)
}
// Load parents before showing the notes so we have hierarchy. Give it a short
// timeout, since this is really just a nice-to-have
const combined = uniqBy(

View File

@ -1,12 +1,14 @@
<script lang="ts">
import Notes from "src/views/notes/Feed.svelte"
import Feed from "src/views/notes/Feed.svelte"
import {isLike} from 'src/util/nostr'
import {sampleRelays, getPubkeyWriteRelays} from 'src/agent/relays'
export let pubkey
const relays = sampleRelays(getPubkeyWriteRelays(pubkey))
const filter = {kinds: [7], authors: [pubkey]}
const shouldDisplay = e => isLike(e.content)
</script>
<Notes {relays} {filter} />
<Feed {relays} {filter} {shouldDisplay} />