mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +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
|
|
@ -8,7 +8,7 @@ import {
|
|||
|
||||
import { ComposeType } from 'Common/EnumsUser';
|
||||
|
||||
import { pInt } from 'Common/Utils';
|
||||
import { isNonEmptyArray, pInt } from 'Common/Utils';
|
||||
import { delegateRunOnDestroy, computedPaginatorHelper, showMessageComposer } from 'Common/UtilsUser';
|
||||
|
||||
import { Selector } from 'Common/Selector';
|
||||
|
|
@ -164,7 +164,7 @@ class ContactsPopupView extends AbstractViewPopup {
|
|||
bccEmails = null;
|
||||
|
||||
const aC = this.contactsCheckedOrSelected();
|
||||
if (Array.isNotEmpty(aC)) {
|
||||
if (isNonEmptyArray(aC)) {
|
||||
aE = aC.map(oItem => {
|
||||
if (oItem) {
|
||||
const data = oItem.getNameAndEmailHelper(),
|
||||
|
|
@ -181,7 +181,7 @@ class ContactsPopupView extends AbstractViewPopup {
|
|||
aE = aE.filter(value => !!value);
|
||||
}
|
||||
|
||||
if (Array.isNotEmpty(aE)) {
|
||||
if (isNonEmptyArray(aE)) {
|
||||
this.bBackToCompose = false;
|
||||
|
||||
hideScreenPopup(ContactsPopupView);
|
||||
|
|
@ -461,7 +461,7 @@ class ContactsPopupView extends AbstractViewPopup {
|
|||
list = [];
|
||||
|
||||
if (!iError && data && data.Result && data.Result.List) {
|
||||
if (Array.isNotEmpty(data.Result.List)) {
|
||||
if (isNonEmptyArray(data.Result.List)) {
|
||||
data.Result.List.forEach(item => {
|
||||
item = ContactModel.reviveFromJson(item);
|
||||
item && list.push(item);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { Scope, Notification } from 'Common/Enums';
|
||||
import { getNotification, i18n } from 'Common/Translator';
|
||||
import { isNonEmptyArray } from 'Common/Utils';
|
||||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
|
|
@ -75,7 +76,7 @@ class PluginPopupView extends AbstractViewPopup {
|
|||
this.readme(oPlugin.Readme);
|
||||
|
||||
const config = oPlugin.Config;
|
||||
if (Array.isNotEmpty(config)) {
|
||||
if (isNonEmptyArray(config)) {
|
||||
this.configures(
|
||||
config.map(item => ({
|
||||
'value': ko.observable(item[0]),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import {
|
|||
|
||||
import { doc, $htmlCL, leftPanelDisabled, keyScopeReal, moveAction, Settings } from 'Common/Globals';
|
||||
|
||||
import { inFocus } from 'Common/Utils';
|
||||
import { isNonEmptyArray, inFocus } from 'Common/Utils';
|
||||
import { mailToHelper, showMessageComposer } from 'Common/UtilsUser';
|
||||
|
||||
import { SMAudio } from 'Common/Audio';
|
||||
|
|
@ -80,7 +80,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
this.allowMessageListActions = Settings.capa(Capa.MessageListActions);
|
||||
|
||||
const attachmentsActions = Settings.app('attachmentsActions');
|
||||
this.attachmentsActions = ko.observableArray(Array.isNotEmpty(attachmentsActions) ? attachmentsActions : []);
|
||||
this.attachmentsActions = ko.observableArray(isNonEmptyArray(attachmentsActions) ? attachmentsActions : []);
|
||||
|
||||
this.message = MessageUserStore.message;
|
||||
this.hasCheckedMessages = MessageUserStore.hasCheckedMessages;
|
||||
|
|
@ -177,7 +177,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
viewFromDkimStatusTitle:() => {
|
||||
const status = this.viewFromDkimData();
|
||||
if (Array.isNotEmpty(status)) {
|
||||
if (isNonEmptyArray(status)) {
|
||||
if (status[0]) {
|
||||
return status[1] || 'DKIM: ' + status[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue