feat(reply): navigate to thread on publish (#852)
parent
c1aac9d2dc
commit
1817afdb23
|
@ -159,6 +159,8 @@ async function publish() {
|
|||
status = await masto.statuses.create(payload)
|
||||
else
|
||||
status = await masto.statuses.update(draft.editingStatus.id, payload)
|
||||
if (draft.params.inReplyToId)
|
||||
navigateToStatus({ status })
|
||||
|
||||
draft = initial()
|
||||
emit('published', status)
|
||||
|
|
|
@ -26,9 +26,8 @@ const reply = () => {
|
|||
return
|
||||
if (details)
|
||||
focusEditor()
|
||||
|
||||
else
|
||||
navigateTo({ path: getStatusRoute(status).href, state: { focusReply: true } })
|
||||
navigateToStatus({ status, focusReply: true })
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import type { Status } from 'masto'
|
||||
|
||||
export const navigateToStatus = ({ status, focusReply = false }: { status: Status; focusReply?: boolean }) => navigateTo({ path: getStatusRoute(status).href, state: { focusReply } })
|
Loading…
Reference in New Issue