parent
f542011b55
commit
ed7989cc2c
|
@ -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