mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
Resolve #547
This commit is contained in:
parent
f649ea05fd
commit
7250bfa1e1
1 changed files with 17 additions and 17 deletions
|
|
@ -1242,25 +1242,25 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
*/
|
*/
|
||||||
prepareMessageAttachments(message, type) {
|
prepareMessageAttachments(message, type) {
|
||||||
if (message) {
|
if (message) {
|
||||||
if (ComposeType.ForwardAsAttachment === type) {
|
let reply = [ComposeType.Reply, ComposeType.ReplyAll].includes(type);
|
||||||
this.addMessageAsAttachment(message);
|
if (reply || [ComposeType.Forward, ComposeType.Draft, ComposeType.EditAsNew].includes(type)) {
|
||||||
} else if ([
|
|
||||||
ComposeType.Reply, ComposeType.ReplyAll,
|
|
||||||
ComposeType.Forward, ComposeType.Draft, ComposeType.EditAsNew
|
|
||||||
].includes(type)) {
|
|
||||||
message.attachments.forEach(item => {
|
message.attachments.forEach(item => {
|
||||||
const attachment = new ComposeAttachmentModel(
|
if (!reply || item.isLinked()) {
|
||||||
item.download,
|
const attachment = new ComposeAttachmentModel(
|
||||||
item.fileName,
|
item.download,
|
||||||
item.estimatedSize,
|
item.fileName,
|
||||||
item.isInline(),
|
item.estimatedSize,
|
||||||
item.isLinked(),
|
item.isInline(),
|
||||||
item.cid,
|
item.isLinked(),
|
||||||
item.contentLocation
|
item.cid,
|
||||||
);
|
item.contentLocation
|
||||||
attachment.fromMessage = true;
|
);
|
||||||
this.addAttachment(attachment);
|
attachment.fromMessage = true;
|
||||||
|
this.addAttachment(attachment);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
} else if (ComposeType.ForwardAsAttachment === type) {
|
||||||
|
this.addMessageAsAttachment(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue