refactor: sync masto (#1121)
This commit is contained in:
parent
eb1f769e32
commit
4422a57f49
81 changed files with 397 additions and 367 deletions
|
@ -15,13 +15,13 @@ const publishWidget = ref()
|
|||
const { data: status, pending, refresh: refreshStatus } = useAsyncData(
|
||||
`status:${id}`,
|
||||
() => fetchStatus(id),
|
||||
{ watch: [isMastoInitialised], immediate: isMastoInitialised.value },
|
||||
{ watch: [isHydrated], immediate: isHydrated.value },
|
||||
)
|
||||
const masto = useMasto()
|
||||
const { client } = $(useMasto())
|
||||
const { data: context, pending: pendingContext, refresh: refreshContext } = useAsyncData(
|
||||
`context:${id}`,
|
||||
async () => masto.v1.statuses.fetchContext(id),
|
||||
{ watch: [isMastoInitialised], immediate: isMastoInitialised.value },
|
||||
async () => client.v1.statuses.fetchContext(id),
|
||||
{ watch: [isHydrated], immediate: isHydrated.value },
|
||||
)
|
||||
|
||||
const replyDraft = $computed(() => status.value ? getReplyDraft(status.value) : null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue