mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
isArray to native Array.isArray
isUnd(*) to native undefined === *
isFunc to native typeof * === 'function'
isObject to native typeof * === 'object'
microtime() to native Date().getTime();
noop to native ()=>{}
noopFalse to native ()=>false
noopTrue to native ()=>true
boolToAjax to native *?'1':'0'
Underscore.js to native
This commit is contained in:
parent
fa39c7ecba
commit
ea48f5060b
72 changed files with 551 additions and 775 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { MessageSetAction } from 'Common/Enums';
|
||||
import { trim, pInt, isArray } from 'Common/Utils';
|
||||
import { trim, pInt } from 'Common/Utils';
|
||||
|
||||
let FOLDERS_CACHE = {},
|
||||
FOLDERS_NAME_CACHE = {},
|
||||
|
|
@ -266,7 +266,7 @@ export function storeMessageFlagsToCache(message) {
|
|||
* @param {Array} flags
|
||||
*/
|
||||
export function storeMessageFlagsToCacheByFolderAndUid(folder, uid, flags) {
|
||||
if (isArray(flags) && flags.length) {
|
||||
if (Array.isArray(flags) && flags.length) {
|
||||
setMessageFlagsToCache(folder, uid, flags);
|
||||
}
|
||||
}
|
||||
|
|
@ -280,7 +280,7 @@ export function storeMessageFlagsToCacheBySetAction(folder, uid, setAction) {
|
|||
let unread = 0;
|
||||
const flags = getMessageFlagsFromCache(folder, uid);
|
||||
|
||||
if (isArray(flags) && flags.length) {
|
||||
if (Array.isArray(flags) && flags.length) {
|
||||
if (flags[0]) {
|
||||
unread = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue