Fix a couple bugs

This commit is contained in:
Jonathan Staab 2023-02-18 13:27:08 -06:00
parent bc934212db
commit 0d97800713
3 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# Current
- [ ] Try lumping tables into a single key each to reduce load/save contention and time
- [ ] Keep track of relays that fail to connect and don't use them
# Snacks

View File

@ -213,6 +213,11 @@ const processRoutes = async events => {
// Sample events so we're not burning too many resources
for (const e of ensurePlural(shuffle(events)).slice(0, 10)) {
switcherFn(e.kind, {
0: () => {
updates.push(
calculateRoute(e.pubkey, e.content, 'seen', 'write', e.created_at)
)
},
2: () => {
updates.push(
calculateRoute(e.pubkey, e.content, 'kind:2', 'read', e.created_at)

View File

@ -73,10 +73,12 @@
}
onMount(() => {
const person = database.getPersonWithFallback(pubkey)
if (pubkey) {
const person = database.getPersonWithFallback(pubkey)
input.type('@' + displayPerson(person))
input.trigger({key: 'Enter'})
input.type('@' + displayPerson(person))
input.trigger({key: 'Enter'})
}
})
</script>