mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 03:59:21 +03:00
Underscore.js _.map() to native Array.map() (optional with Object.entries/values)
This commit is contained in:
parent
032fa8c736
commit
a82575a830
27 changed files with 68 additions and 78 deletions
|
|
@ -453,7 +453,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
// aTo = [],
|
||||
// EmailModel = require('Model/Email').default,
|
||||
// fParseEmailLine = function(sLine) {
|
||||
// return sLine ? _.compact(_.map([window.decodeURIComponent(sLine)], function(sItem) {
|
||||
// return sLine ? _.compact([window.decodeURIComponent(sLine)].map(sItem => {
|
||||
// var oEmailModel = new EmailModel();
|
||||
// oEmailModel.parse(sItem);
|
||||
// return '' !== oEmailModel.email ? oEmailModel : null;
|
||||
|
|
@ -478,7 +478,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
const div = $('<div>'),
|
||||
dynamicEls = _.compact(
|
||||
_.map(this.message().attachments(), (item) => {
|
||||
this.message().attachments().map(item => {
|
||||
if (item && !item.isLinked && item.isImage()) {
|
||||
if (item === attachment) {
|
||||
index = listIndex;
|
||||
|
|
@ -885,7 +885,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
getAttachmentsHashes() {
|
||||
const atts = this.message() ? this.message().attachments() : [];
|
||||
return _.compact(_.map(atts, (item) => (item && !item.isLinked && item.checked() ? item.download : '')));
|
||||
return _.compact(atts.map(item => (item && !item.isLinked && item.checked() ? item.download : '')));
|
||||
}
|
||||
|
||||
downloadAsZip() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue