forked from Mirrors/elk
parent
f542011b55
commit
ed7989cc2c
2 changed files with 7 additions and 1 deletions
|
@ -85,7 +85,7 @@ async function editStatus() {
|
|||
openPublishDialog(`edit-${status.id}`, {
|
||||
...await getDraftFromStatus(status),
|
||||
editingStatus: status,
|
||||
})
|
||||
}, true)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
|||
visibility = 'public',
|
||||
attachments = [],
|
||||
initialText = '',
|
||||
sensitive = false,
|
||||
spoilerText = '',
|
||||
} = options
|
||||
|
||||
return {
|
||||
|
@ -18,6 +20,8 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
|||
status,
|
||||
inReplyToId,
|
||||
visibility,
|
||||
sensitive,
|
||||
spoilerText,
|
||||
},
|
||||
attachments,
|
||||
initialText,
|
||||
|
@ -30,6 +34,8 @@ export async function getDraftFromStatus(status: Status, text?: null | string):
|
|||
mediaIds: status.mediaAttachments.map(att => att.id),
|
||||
visibility: status.visibility,
|
||||
attachments: status.mediaAttachments,
|
||||
sensitive: status.sensitive,
|
||||
spoilerText: status.spoilerText,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue