mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +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
|
|
@ -10,16 +10,14 @@ class EmailCollectionModel extends Array
|
|||
|
||||
/**
|
||||
* @param {?Array} json
|
||||
* @returns {Array.<EmailModel>}
|
||||
* @returns {EmailCollectionModel}
|
||||
*/
|
||||
static reviveFromJson(items) {
|
||||
let result = new EmailCollectionModel;
|
||||
if (Array.isArray(items)) {
|
||||
items.forEach(email => {
|
||||
email = EmailModel.newInstanceFromJson(email);
|
||||
email && result.push(email);
|
||||
});
|
||||
}
|
||||
Array.isArray(items) && items.forEach(email => {
|
||||
email = EmailModel.newInstanceFromJson(email);
|
||||
email && result.push(email);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue