fix: refresh status after edit (#2032)

This commit is contained in:
Alex 2023-04-30 23:19:14 +08:00 committed by GitHub
parent c7b77216c1
commit ccf115ca4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View file

@ -16,7 +16,7 @@ const main = ref<ComponentPublicInstance | null>(null)
const { data: status, pending, refresh: refreshStatus } = useAsyncData(
`status:${id}`,
() => fetchStatus(id),
() => fetchStatus(id, true),
{ watch: [isHydrated], immediate: isHydrated.value, default: () => shallowRef() },
)
const { client } = $(useMasto())
@ -83,6 +83,7 @@ onReactivated(() => {
:newer="context?.ancestors.at(-1)"
command
style="scroll-margin-top: 60px"
@refetch-status="refreshStatus()"
/>
<PublishWidget
v-if="currentUser"