mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
JavaScript inArray()/indexOf() to .includes()
This commit is contained in:
parent
ec3fd5b7e4
commit
db2d95d684
20 changed files with 69 additions and 86 deletions
|
|
@ -9,7 +9,6 @@ import {
|
|||
trim,
|
||||
isNormal,
|
||||
isArray,
|
||||
inArray,
|
||||
pInt,
|
||||
pString,
|
||||
plainToHtml,
|
||||
|
|
@ -308,7 +307,7 @@ class MessageUserStore {
|
|||
currentFolderFullNameRaw = FolderStore.currentFolderFullNameRaw(),
|
||||
messages =
|
||||
currentFolderFullNameRaw === fromFolderFullNameRaw
|
||||
? _.filter(messageList, (item) => item && -1 < inArray(pInt(item.uid), uidForRemove))
|
||||
? _.filter(messageList, (item) => item && uidForRemove.includes(pInt(item.uid)))
|
||||
: [];
|
||||
|
||||
_.each(messages, (item) => {
|
||||
|
|
@ -499,7 +498,7 @@ class MessageUserStore {
|
|||
message.folderFullNameRaw === data.Result.Folder
|
||||
) {
|
||||
const threads = message.threads();
|
||||
if (message.uid !== data.Result.Uid && 1 < threads.length && -1 < inArray(data.Result.Uid, threads)) {
|
||||
if (message.uid !== data.Result.Uid && 1 < threads.length && threads.includes(data.Result.Uid)) {
|
||||
message = MessageModel.newInstanceFromJson(data.Result);
|
||||
if (message) {
|
||||
message.threads(threads);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue