mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Attachments array to new AttachmentCollectionModel
This commit is contained in:
parent
344edaec2a
commit
e99a69a9aa
5 changed files with 70 additions and 105 deletions
|
|
@ -1162,7 +1162,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
|
||||
cancelAttachmentHelper(id, oJua) {
|
||||
return () => {
|
||||
const attachment = this.attachments().find(item => item && item.id === id);
|
||||
const attachment = this.getAttachmentById(id);
|
||||
if (attachment) {
|
||||
this.attachments.remove(attachment);
|
||||
delegateRunOnDestroy(attachment);
|
||||
|
|
@ -1367,8 +1367,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
if (ComposeType.ForwardAsAttachment === type) {
|
||||
this.addMessageAsAttachment(message);
|
||||
} else {
|
||||
const attachments = message.attachments();
|
||||
(Array.isNotEmpty(attachments) ? attachments : []).forEach(item => {
|
||||
message.attachments.forEach(item => {
|
||||
let add = false;
|
||||
switch (type) {
|
||||
case ComposeType.Reply:
|
||||
|
|
@ -1409,14 +1408,6 @@ class ComposePopupView extends AbstractViewNext {
|
|||
}
|
||||
}
|
||||
|
||||
removeLinkedAttachments() {
|
||||
const arrachment = this.attachments().find(item => item && item.isLinked);
|
||||
if (arrachment) {
|
||||
this.attachments.remove(arrachment);
|
||||
delegateRunOnDestroy(arrachment);
|
||||
}
|
||||
}
|
||||
|
||||
setMessageAttachmentFailedDownloadText() {
|
||||
this.attachments().forEach(attachment => {
|
||||
if (attachment && attachment.fromMessage) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue