mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Use jQuery.slim
Underscore.js _.uniq(_.compact( to native Array.filter((value, index, self) => !!value && self.indexOf(value) == index) Underscore.js _.compact to native Array.filter(value => !!value) Underscore.js _.uniq to native Array.filter((value, index, self) => self.indexOf(value) == index) Underscore.js _.values to native Object.values Underscore.js _.flatten to native Array.flat Underscore.js _.union to native Array.concat + unique filter Underscore.js _.reduce to native Array.reduce Underscore.js _.escape replaced with advanced htmlspecialchars() Underscore.js _.memoize replaced Now Underscore.js is a slim custom version (only _.debounce, _.defer & _.throttle)
This commit is contained in:
parent
996a71ad8a
commit
dca0ff02ed
27 changed files with 515 additions and 353 deletions
|
|
@ -600,13 +600,13 @@ class ComposePopupView extends AbstractViewNext {
|
|||
case ComposeType.ReplyAll:
|
||||
case ComposeType.Forward:
|
||||
case ComposeType.ForwardAsAttachment:
|
||||
_.union(message.to, message.cc, message.bcc).forEach(fEachHelper);
|
||||
message.to.concat(message.cc, message.bcc).forEach(fEachHelper);
|
||||
if (!resultIdentity) {
|
||||
message.deliveredTo.forEach(fEachHelper);
|
||||
}
|
||||
break;
|
||||
case ComposeType.Draft:
|
||||
_.union(message.from, message.replyTo).forEach(fEachHelper);
|
||||
message.from.concat(message.replyTo).forEach(fEachHelper);
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
|
|
@ -859,7 +859,8 @@ class ComposePopupView extends AbstractViewNext {
|
|||
addEmailsTo(fKoValue, emails) {
|
||||
if (isNonEmptyArray(emails)) {
|
||||
const value = trim(fKoValue()),
|
||||
values = _.uniq(_.compact(emails.map(item => (item ? item.toLine(false) : null))));
|
||||
values = emails.map(item => item ? item.toLine(false) : null)
|
||||
.filter((value, index, self) => !!value && self.indexOf(value) == index);
|
||||
|
||||
fKoValue(value + ('' === value ? '' : ', ') + trim(values.join(', ')));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue