mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Cleanup array.length checks and for() to forEach()
This commit is contained in:
parent
db5751cd00
commit
82bed1ed80
24 changed files with 135 additions and 169 deletions
|
|
@ -449,14 +449,14 @@ class RemoteUserAjax extends AbstractAjaxRemote {
|
|||
let request = true;
|
||||
const uids = [];
|
||||
|
||||
if (isArray(list) && 0 < list.length) {
|
||||
if (isArray(list) && list.length) {
|
||||
request = false;
|
||||
list.forEach(messageListItem => {
|
||||
if (!getMessageFlagsFromCache(messageListItem.folderFullNameRaw, messageListItem.uid)) {
|
||||
uids.push(messageListItem.uid);
|
||||
}
|
||||
|
||||
if (0 < messageListItem.threads().length) {
|
||||
if (messageListItem.threads().length) {
|
||||
messageListItem.threads().forEach(uid => {
|
||||
if (!getMessageFlagsFromCache(messageListItem.folderFullNameRaw, uid)) {
|
||||
uids.push(uid);
|
||||
|
|
@ -465,7 +465,7 @@ class RemoteUserAjax extends AbstractAjaxRemote {
|
|||
}
|
||||
});
|
||||
|
||||
if (0 < uids.length) {
|
||||
if (uids.length) {
|
||||
request = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue