Fix some chat related bugs
This commit is contained in:
parent
97ff8ff802
commit
fe89df2aa3
2 changed files with 7 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type {Snippet} from "svelte"
|
import type {Snippet} from "svelte"
|
||||||
import {onMount} from "svelte"
|
import {onMount} from "svelte"
|
||||||
|
import {goto} from "$app/navigation"
|
||||||
import {
|
import {
|
||||||
ago,
|
ago,
|
||||||
int,
|
int,
|
||||||
|
|
@ -73,7 +74,7 @@
|
||||||
? pushModal(ProfileDetail, {pubkey: others[0]})
|
? pushModal(ProfileDetail, {pubkey: others[0]})
|
||||||
: pushModal(ChatMembers, {pubkeys: others})
|
: pushModal(ChatMembers, {pubkeys: others})
|
||||||
|
|
||||||
const back = () => history.back()
|
const back = () => goto("/chat")
|
||||||
|
|
||||||
const replyTo = (event: TrustedEvent) => {
|
const replyTo = (event: TrustedEvent) => {
|
||||||
parent = event
|
parent = event
|
||||||
|
|
|
||||||
|
|
@ -546,8 +546,11 @@ export const chatsById = call(() => {
|
||||||
|
|
||||||
const unsubscribers = [
|
const unsubscribers = [
|
||||||
on(repository, "update", ({added, removed}: RepositoryUpdate) => {
|
on(repository, "update", ({added, removed}: RepositoryUpdate) => {
|
||||||
|
// Do this async so that profiles are populated
|
||||||
|
setTimeout(() => {
|
||||||
addEvents(added)
|
addEvents(added)
|
||||||
removeEvents(removed)
|
removeEvents(removed)
|
||||||
|
}, 50)
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue