mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Changes _.filter(array) to native array.filter()
This commit is contained in:
parent
af136f46c4
commit
eb15c6e45f
8 changed files with 30 additions and 32 deletions
|
|
@ -142,7 +142,7 @@ class MessageUserStore {
|
|||
this.isMessageSelected = ko.computed(() => null !== this.message());
|
||||
|
||||
this.messageListChecked = ko
|
||||
.computed(() => _.filter(this.messageList(), (item) => item.checked()))
|
||||
.computed(() => this.messageList().filter(item => item.checked()))
|
||||
.extend({ rateLimit: 0 });
|
||||
|
||||
this.hasCheckedMessages = ko.computed(() => 0 < this.messageListChecked().length).extend({ rateLimit: 0 });
|
||||
|
|
@ -307,7 +307,7 @@ class MessageUserStore {
|
|||
currentFolderFullNameRaw = FolderStore.currentFolderFullNameRaw(),
|
||||
messages =
|
||||
currentFolderFullNameRaw === fromFolderFullNameRaw
|
||||
? _.filter(messageList, (item) => item && uidForRemove.includes(pInt(item.uid)))
|
||||
? messageList.filter(item => item && uidForRemove.includes(pInt(item.uid)))
|
||||
: [];
|
||||
|
||||
_.each(messages, (item) => {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ class PgpUserStore {
|
|||
this.openpgpkeys = ko.observableArray([]);
|
||||
this.openpgpKeyring = null;
|
||||
|
||||
this.openpgpkeysPublic = ko.computed(() => _.filter(this.openpgpkeys(), (item) => !!(item && !item.isPrivate)));
|
||||
this.openpgpkeysPrivate = ko.computed(() => _.filter(this.openpgpkeys(), (item) => !!(item && item.isPrivate)));
|
||||
this.openpgpkeysPublic = ko.computed(() => this.openpgpkeys().filter(item => !!(item && !item.isPrivate)));
|
||||
this.openpgpkeysPrivate = ko.computed(() => this.openpgpkeys().filter(item => !!(item && item.isPrivate)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -124,7 +124,7 @@ class PgpUserStore {
|
|||
* @returns {?}
|
||||
*/
|
||||
findAllPublicKeysByEmailNotNative(email) {
|
||||
return _.filter(this.openpgpkeysPublic(), (item) => item && -1 < item.emails.indexOf(email)) || null;
|
||||
return this.openpgpkeysPublic().filter(item => item && -1 < item.emails.indexOf(email)) || null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -132,7 +132,7 @@ class PgpUserStore {
|
|||
* @returns {?}
|
||||
*/
|
||||
findAllPrivateKeysByEmailNotNative(email) {
|
||||
return _.filter(this.openpgpkeysPrivate(), (item) => item && -1 < item.emails.indexOf(email)) || null;
|
||||
return this.openpgpkeysPrivate().filter(item => item && -1 < item.emails.indexOf(email)) || null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue