mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Merge Objects prototype extensions
This commit is contained in:
parent
0647b5201f
commit
f2d194947d
26 changed files with 108 additions and 127 deletions
|
|
@ -2,7 +2,6 @@ import ko from 'ko';
|
|||
import { Focused, KeyState } from 'Common/Enums';
|
||||
|
||||
import { keyScope, leftPanelDisabled } from 'Common/Globals';
|
||||
import { isNonEmptyArray } from 'Common/Utils';
|
||||
|
||||
import { AbstractAppStore } from 'Stores/AbstractApp';
|
||||
|
||||
|
|
@ -70,7 +69,7 @@ class AppUserStore extends AbstractAppStore {
|
|||
this.contactsIsAllowed(!!Settings.get('ContactsIsAllowed'));
|
||||
|
||||
const attachmentsActions = Settings.app('attachmentsActions');
|
||||
this.attachmentsActions(isNonEmptyArray(attachmentsActions) ? attachmentsActions : []);
|
||||
this.attachmentsActions(Array.isNotEmpty(attachmentsActions) ? attachmentsActions : []);
|
||||
|
||||
this.devEmail = Settings.get('DevEmail');
|
||||
this.devPassword = Settings.get('DevPassword');
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class FolderUserStore {
|
|||
trashFolder = this.trashFolder(),
|
||||
archiveFolder = this.archiveFolder();
|
||||
|
||||
if (Array.isArray(folders) && folders.length) {
|
||||
if (Array.isNotEmpty(folders)) {
|
||||
if (sentFolder && UNUSED_OPTION_VALUE !== sentFolder) {
|
||||
list.push(sentFolder);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ class MessageUserStore {
|
|||
|
||||
initUidNextAndNewMessages(folder, uidNext, newMessages) {
|
||||
if (getFolderInboxName() === folder && uidNext) {
|
||||
if (Array.isArray(newMessages) && newMessages.length) {
|
||||
if (Array.isNotEmpty(newMessages)) {
|
||||
newMessages.forEach(item => {
|
||||
addNewMessageCache(folder, item.Uid);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { isNonEmptyArray, pString } from 'Common/Utils';
|
||||
import { pString } from 'Common/Utils';
|
||||
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function domControlEncryptedClickHelper(store, dom, armoredMessage, recipients)
|
|||
decryptedMessage.getText()
|
||||
);
|
||||
} else if (validPrivateKey) {
|
||||
const keyIds = isNonEmptyArray(signingKeyIds) ? signingKeyIds : null,
|
||||
const keyIds = Array.isNotEmpty(signingKeyIds) ? signingKeyIds : null,
|
||||
additional = keyIds
|
||||
? keyIds.map(item => (item && item.toHex ? item.toHex() : null)).filter(value => !!value).join(', ')
|
||||
: '';
|
||||
|
|
@ -107,7 +107,7 @@ function domControlSignedClickHelper(store, dom, armoredMessage) {
|
|||
message.getText()
|
||||
);
|
||||
} else {
|
||||
const keyIds = isNonEmptyArray(signingKeyIds) ? signingKeyIds : null,
|
||||
const keyIds = Array.isNotEmpty(signingKeyIds) ? signingKeyIds : null,
|
||||
additional = keyIds
|
||||
? keyIds.map(item => (item && item.toHex ? item.toHex() : null)).filter(value => !!value).join(', ')
|
||||
: '';
|
||||
|
|
@ -183,7 +183,7 @@ class PgpUserStore {
|
|||
}).flat().filter(value => !!value)
|
||||
: [];
|
||||
|
||||
if (!result.length && isNonEmptyArray(recipients)) {
|
||||
if (!result.length && Array.isNotEmpty(recipients)) {
|
||||
result = recipients.map(sEmail => {
|
||||
const keys = sEmail ? this.findAllPrivateKeysByEmailNotNative(sEmail) : null;
|
||||
return keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue