mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Array.isArray to isArray
Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
parent
986b8f056b
commit
0b64083543
30 changed files with 82 additions and 69 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Notification } from 'Common/Enums';
|
||||
import { Settings } from 'Common/Globals';
|
||||
import { pInt, pString } from 'Common/Utils';
|
||||
import { isArray, pInt, pString } from 'Common/Utils';
|
||||
import { serverRequest } from 'Common/Links';
|
||||
|
||||
let iJsonErrorCount = 0,
|
||||
|
|
@ -169,7 +169,7 @@ export class AbstractFetchRemote
|
|||
setTrigger(trigger, value) {
|
||||
if (trigger) {
|
||||
value = !!value;
|
||||
(Array.isArray(trigger) ? trigger : [trigger]).forEach(fTrigger => {
|
||||
(isArray(trigger) ? trigger : [trigger]).forEach(fTrigger => {
|
||||
fTrigger && fTrigger(value);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { pString, pInt } from 'Common/Utils';
|
||||
import { isArray, isNonEmptyArray, pString, pInt } from 'Common/Utils';
|
||||
|
||||
import {
|
||||
getFolderHash,
|
||||
|
|
@ -440,7 +440,7 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
|||
let request = true;
|
||||
const uids = [];
|
||||
|
||||
if (Array.isNotEmpty(list)) {
|
||||
if (isNonEmptyArray(list)) {
|
||||
request = false;
|
||||
list.forEach(messageListItem => {
|
||||
if (!MessageFlagsCache.getFor(messageListItem.folder, messageListItem.uid)) {
|
||||
|
|
@ -464,7 +464,7 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
|||
if (request) {
|
||||
this.defaultRequest(fCallback, 'FolderInformation', {
|
||||
Folder: folder,
|
||||
FlagsUids: Array.isArray(uids) ? uids.join(',') : '',
|
||||
FlagsUids: isArray(uids) ? uids.join(',') : '',
|
||||
UidNext: getFolderInboxName() === folder ? getFolderUidNext(folder) : ''
|
||||
});
|
||||
} else if (SettingsUserStore.useThreads()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue