Add conversation threads and prepare 0.6.0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+6
-1
@@ -529,6 +529,9 @@ function setupDraftComposer() {
|
||||
const modal = root.querySelector('.compose-modal');
|
||||
if (!modal) return;
|
||||
modal.dataset.draftId = draft?.id || '';
|
||||
modal._replyHeaders = draft
|
||||
? { inReplyTo: draft.inReplyTo || '', references: draft.references || '' }
|
||||
: reply && !forward ? window.epMailConversationThreads.replyHeaders(reply) : { inReplyTo: '', references: '' };
|
||||
let attachments = Array.isArray(draft?.attachments) ? draft.attachments : [];
|
||||
modal._composeAttachments = attachments;
|
||||
const fields = modal.querySelector('.compose-fields');
|
||||
@@ -630,7 +633,8 @@ function setupDraftComposer() {
|
||||
cc: modal.querySelector('#compose-cc').value,
|
||||
subject: modal.querySelector('#compose-subject').value,
|
||||
text: modal.querySelector('#compose-body').value,
|
||||
attachments: [...attachments]
|
||||
attachments: [...attachments],
|
||||
...modal._replyHeaders
|
||||
};
|
||||
if (!modal.dataset.draftId && ![values.to, values.cc, values.subject, values.text].some(value => value.trim()) && !values.attachments.length) return Promise.resolve(false);
|
||||
values.id = modal.dataset.draftId || window.crypto.randomUUID();
|
||||
@@ -1053,6 +1057,7 @@ if (window.daybreakMail) {
|
||||
text: selectMailUi('#compose-body').value,
|
||||
attachments: selectMailUi('#modal-root .compose-modal')?._composeAttachments || [],
|
||||
displayName: mailFeatureState.connectedAccount.displayName || window.epMailFeatures.productivity?.profileName || '',
|
||||
...(selectMailUi('#modal-root .compose-modal')?._replyHeaders || {}),
|
||||
...(pgp ? { pgp } : {})
|
||||
});
|
||||
if (result.failed) {
|
||||
|
||||
Reference in New Issue
Block a user