forked from Mirrors/elk
fix(status): add language from status when redraft
This commit is contained in:
parent
8983edd1bb
commit
154885ca96
2 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,7 @@ const deleteAndRedraft = async () => {
|
||||||
await openPublishDialog('dialog', await getDraftFromStatus(status), true)
|
await openPublishDialog('dialog', await getDraftFromStatus(status), true)
|
||||||
|
|
||||||
// Go to the new status, if the page is the old status
|
// 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))
|
router.push(getStatusRoute(lastPublishDialogStatus.value))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
||||||
initialText = '',
|
initialText = '',
|
||||||
sensitive = false,
|
sensitive = false,
|
||||||
spoilerText = '',
|
spoilerText = '',
|
||||||
|
language,
|
||||||
} = options
|
} = options
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -22,6 +23,7 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
||||||
visibility,
|
visibility,
|
||||||
sensitive,
|
sensitive,
|
||||||
spoilerText,
|
spoilerText,
|
||||||
|
language,
|
||||||
},
|
},
|
||||||
attachments,
|
attachments,
|
||||||
initialText,
|
initialText,
|
||||||
|
@ -36,6 +38,7 @@ export async function getDraftFromStatus(status: Status): Promise<Draft> {
|
||||||
attachments: status.mediaAttachments,
|
attachments: status.mediaAttachments,
|
||||||
sensitive: status.sensitive,
|
sensitive: status.sensitive,
|
||||||
spoilerText: status.spoilerText,
|
spoilerText: status.spoilerText,
|
||||||
|
language: status.language,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue