From 154885ca9637a364fa3f8e2b90ff1b2308d5cd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Wed, 4 Jan 2023 17:39:12 +0800 Subject: [PATCH] fix(status): add language from status when redraft --- components/status/StatusActionsMore.vue | 2 +- composables/statusDrafts.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/status/StatusActionsMore.vue b/components/status/StatusActionsMore.vue index bb3cf503..0fcbda85 100644 --- a/components/status/StatusActionsMore.vue +++ b/components/status/StatusActionsMore.vue @@ -91,7 +91,7 @@ const deleteAndRedraft = async () => { await openPublishDialog('dialog', await getDraftFromStatus(status), true) // Go to the new status, if the page is the old status - if (lastPublishDialogStatus.value && route.matched.some(m => m.path === '/:server?/@:account/:status')) + if (lastPublishDialogStatus.value && route.name === 'status') router.push(getStatusRoute(lastPublishDialogStatus.value)) } diff --git a/composables/statusDrafts.ts b/composables/statusDrafts.ts index b2b4101e..ec4c93bf 100644 --- a/composables/statusDrafts.ts +++ b/composables/statusDrafts.ts @@ -13,6 +13,7 @@ export function getDefaultDraft(options: Partial { attachments: status.mediaAttachments, sensitive: status.sensitive, spoilerText: status.spoilerText, + language: status.language, }) }