Changes _.filter(array) to native array.filter()

This commit is contained in:
djmaze 2020-07-20 21:29:44 +02:00
parent af136f46c4
commit eb15c6e45f
8 changed files with 30 additions and 32 deletions

View file

@ -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) => {