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}`, {
|
openPublishDialog(`edit-${status.id}`, {
|
||||||
...await getDraftFromStatus(status),
|
...await getDraftFromStatus(status),
|
||||||
editingStatus: status,
|
editingStatus: status,
|
||||||
})
|
}, true)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
||||||
visibility = 'public',
|
visibility = 'public',
|
||||||
attachments = [],
|
attachments = [],
|
||||||
initialText = '',
|
initialText = '',
|
||||||
|
sensitive = false,
|
||||||
|
spoilerText = '',
|
||||||
} = options
|
} = options
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -18,6 +20,8 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
||||||
status,
|
status,
|
||||||
inReplyToId,
|
inReplyToId,
|
||||||
visibility,
|
visibility,
|
||||||
|
sensitive,
|
||||||
|
spoilerText,
|
||||||
},
|
},
|
||||||
attachments,
|
attachments,
|
||||||
initialText,
|
initialText,
|
||||||
|
@ -30,6 +34,8 @@ export async function getDraftFromStatus(status: Status, text?: null | string):
|
||||||
mediaIds: status.mediaAttachments.map(att => att.id),
|
mediaIds: status.mediaAttachments.map(att => att.id),
|
||||||
visibility: status.visibility,
|
visibility: status.visibility,
|
||||||
attachments: status.mediaAttachments,
|
attachments: status.mediaAttachments,
|
||||||
|
sensitive: status.sensitive,
|
||||||
|
spoilerText: status.spoilerText,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue