1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 22:38:11 +09:00

fix: loading status replies after page refresh (#780)

This commit is contained in:
Ivan Demchuk 2023-01-04 21:55:57 +02:00 committed by GitHub
parent 7d6904d73b
commit 4eb9d52fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,11 @@ const { data: status, pending, refresh: refreshStatus } = useAsyncData(
{ watch: [isMastoInitialised], immediate: isMastoInitialised.value },
)
const masto = useMasto()
const { data: context, pending: pendingContext, refresh: refreshContext } = useAsyncData(`context:${id}`, () => masto.statuses.fetchContext(id))
const { data: context, pending: pendingContext, refresh: refreshContext } = useAsyncData(
`context:${id}`,
async () => masto.statuses.fetchContext(id),
{ watch: [isMastoInitialised], immediate: isMastoInitialised.value },
)
const replyDraft = $computed(() => status.value ? getReplyDraft(status.value) : null)