Commit d3ea97fb authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #18927 TIME 0:02 fix condition

parent 7ceb162d
...@@ -310,22 +310,20 @@ export class MailEditorComponent implements OnInit, OnDestroy { ...@@ -310,22 +310,20 @@ export class MailEditorComponent implements OnInit, OnDestroy {
} }
}); });
if (this.emailStatus !== 'SENT') { await this.getAttachElements(false);
await this.getAttachElements(false); const attachIds: number[] = this.emailAttachTool.attachments.list.map((item: any) => item.id);
const attachIds: number[] = this.emailAttachTool.attachments.list.map((item: any) => item.id); this.emailAttach.attachments.forEach((element: any, index: number) => {
this.emailAttach.attachments.forEach((element: any, index: number) => { if (attachIds.indexOf(element.id) > -1) {
if (attachIds.indexOf(element.id) > -1) { const attachment: any = this.emailAttachTool.attachments.list.find((item: any) => item.id === element.id);
const attachment: any = this.emailAttachTool.attachments.list.find((item: any) => item.id === element.id); this.emailAttach.attachments[index] = {
this.emailAttach.attachments[index] = { id: attachment.id,
id: attachment.id, format: attachment.format,
format: attachment.format, label: attachment.label,
label: attachment.label, original: attachment.original,
original: attachment.original, size: attachment.size
size: attachment.size
}
} }
}); }
} });
resolve(true); resolve(true);
}), }),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment