mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Underscore.js _.each() to native Array.forEach() (optional with Object.entries/values)
This commit is contained in:
parent
178e5f6ef7
commit
a5d41edb24
25 changed files with 72 additions and 79 deletions
|
|
@ -79,7 +79,7 @@ class AdminApp extends AbstractApp {
|
||||||
let list = [];
|
let list = [];
|
||||||
const loading = {};
|
const loading = {};
|
||||||
|
|
||||||
_.each(PackageStore.packages(), (item) => {
|
PackageStore.packages().forEach(item => {
|
||||||
if (item && item.loading()) {
|
if (item && item.loading()) {
|
||||||
loading[item.file] = item;
|
loading[item.file] = item;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ class AppUser extends AbstractApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
reloadFlagsCurrentMessageListAndMessageFromCache() {
|
reloadFlagsCurrentMessageListAndMessageFromCache() {
|
||||||
_.each(MessageStore.messageList(), (message) => {
|
MessageStore.messageList().forEach(message => {
|
||||||
initMessageFlagsFromCache(message);
|
initMessageFlagsFromCache(message);
|
||||||
});
|
});
|
||||||
initMessageFlagsFromCache(MessageStore.message());
|
initMessageFlagsFromCache(MessageStore.message());
|
||||||
|
|
@ -293,7 +293,7 @@ class AppUser extends AbstractApp {
|
||||||
const sTrashFolder = FolderStore.trashFolder(),
|
const sTrashFolder = FolderStore.trashFolder(),
|
||||||
sSpamFolder = FolderStore.spamFolder();
|
sSpamFolder = FolderStore.spamFolder();
|
||||||
|
|
||||||
_.each(this.moveCache, (item) => {
|
this.moveCache.forEach(item => {
|
||||||
const isSpam = sSpamFolder === item.To,
|
const isSpam = sSpamFolder === item.To,
|
||||||
isTrash = sTrashFolder === item.To,
|
isTrash = sTrashFolder === item.To,
|
||||||
isHam = !isSpam && sSpamFolder === item.From && getFolderInboxName() === item.To;
|
isHam = !isSpam && sSpamFolder === item.From && getFolderInboxName() === item.To;
|
||||||
|
|
@ -486,7 +486,7 @@ class AppUser extends AbstractApp {
|
||||||
openpgpKeyring = PgpStore.openpgpKeyring,
|
openpgpKeyring = PgpStore.openpgpKeyring,
|
||||||
openpgpKeys = openpgpKeyring ? openpgpKeyring.getAllKeys() : [];
|
openpgpKeys = openpgpKeyring ? openpgpKeyring.getAllKeys() : [];
|
||||||
|
|
||||||
_.each(openpgpKeys, (oItem, iIndex) => {
|
openpgpKeys.forEach((oItem, iIndex) => {
|
||||||
if (oItem && oItem.primaryKey) {
|
if (oItem && oItem.primaryKey) {
|
||||||
const aEmails = [],
|
const aEmails = [],
|
||||||
aUsers = [],
|
aUsers = [],
|
||||||
|
|
@ -499,7 +499,7 @@ class AppUser extends AbstractApp {
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
if (oItem.users) {
|
if (oItem.users) {
|
||||||
_.each(oItem.users, (item) => {
|
oItem.users.forEach(item => {
|
||||||
if (item.userId) {
|
if (item.userId) {
|
||||||
email.clear();
|
email.clear();
|
||||||
email.parse(item.userId.userid);
|
email.parse(item.userId.userid);
|
||||||
|
|
@ -583,7 +583,7 @@ class AppUser extends AbstractApp {
|
||||||
parentEmail = '' === parentEmail ? sAccountEmail : parentEmail;
|
parentEmail = '' === parentEmail ? sAccountEmail : parentEmail;
|
||||||
|
|
||||||
if (isArray(oData.Result.Accounts)) {
|
if (isArray(oData.Result.Accounts)) {
|
||||||
_.each(AccountStore.accounts(), (oAccount) => {
|
AccountStore.accounts().forEach(oAccount => {
|
||||||
counts[oAccount.email] = oAccount.count();
|
counts[oAccount.email] = oAccount.count();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -754,7 +754,7 @@ class AppUser extends AbstractApp {
|
||||||
if (StorageResultType.Success === sResult) {
|
if (StorageResultType.Success === sResult) {
|
||||||
if (oData && oData.Result && oData.Result.List && isNonEmptyArray(oData.Result.List)) {
|
if (oData && oData.Result && oData.Result.List && isNonEmptyArray(oData.Result.List)) {
|
||||||
const utc = momentNowUnix();
|
const utc = momentNowUnix();
|
||||||
_.each(oData.Result.List, (item) => {
|
oData.Result.List.forEach(item => {
|
||||||
const hash = getFolderHash(item.Folder),
|
const hash = getFolderHash(item.Folder),
|
||||||
folder = getFolderFromCacheList(item.Folder);
|
folder = getFolderFromCacheList(item.Folder);
|
||||||
let unreadCountChange = false;
|
let unreadCountChange = false;
|
||||||
|
|
@ -825,7 +825,7 @@ class AppUser extends AbstractApp {
|
||||||
if ('' !== sFolderFullNameRaw && 0 < rootUids.length) {
|
if ('' !== sFolderFullNameRaw && 0 < rootUids.length) {
|
||||||
switch (iSetAction) {
|
switch (iSetAction) {
|
||||||
case MessageSetAction.SetSeen:
|
case MessageSetAction.SetSeen:
|
||||||
_.each(rootUids, (sSubUid) => {
|
rootUids.forEach(sSubUid => {
|
||||||
alreadyUnread += storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
alreadyUnread += storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -838,7 +838,7 @@ class AppUser extends AbstractApp {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MessageSetAction.UnsetSeen:
|
case MessageSetAction.UnsetSeen:
|
||||||
_.each(rootUids, (sSubUid) => {
|
rootUids.forEach(sSubUid => {
|
||||||
alreadyUnread += storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
alreadyUnread += storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -851,7 +851,7 @@ class AppUser extends AbstractApp {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MessageSetAction.SetFlag:
|
case MessageSetAction.SetFlag:
|
||||||
_.each(rootUids, (sSubUid) => {
|
rootUids.forEach(sSubUid => {
|
||||||
storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -859,7 +859,7 @@ class AppUser extends AbstractApp {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MessageSetAction.UnsetFlag:
|
case MessageSetAction.UnsetFlag:
|
||||||
_.each(rootUids, (sSubUid) => {
|
rootUids.forEach(sSubUid => {
|
||||||
storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
storeMessageFlagsToCacheBySetAction(sFolderFullNameRaw, sSubUid, iSetAction);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from '_';
|
|
||||||
import { isObject, isUnd } from 'Common/Utils';
|
import { isObject, isUnd } from 'Common/Utils';
|
||||||
import * as Plugins from 'Common/Plugins';
|
import * as Plugins from 'Common/Plugins';
|
||||||
|
|
||||||
|
|
@ -14,7 +13,7 @@ export function sub(name, func, context) {
|
||||||
context = func || null;
|
context = func || null;
|
||||||
func = null;
|
func = null;
|
||||||
|
|
||||||
_.each(name, (subFunc, subName) => {
|
Object.entries(name).forEach(([subFunc, subName]) => {
|
||||||
sub(subName, subFunc, context);
|
sub(subName, subFunc, context);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -34,7 +33,7 @@ export function pub(name, args) {
|
||||||
Plugins.runHook('rl-pub', [name, args]);
|
Plugins.runHook('rl-pub', [name, args]);
|
||||||
|
|
||||||
if (!isUnd(SUBS[name])) {
|
if (!isUnd(SUBS[name])) {
|
||||||
_.each(SUBS[name], (items) => {
|
SUBS[name].forEach(items => {
|
||||||
if (items[0]) {
|
if (items[0]) {
|
||||||
items[0].apply(items[1] || null, args || []);
|
items[0].apply(items[1] || null, args || []);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from '_';
|
|
||||||
import { isFunc, isArray, isUnd } from 'Common/Utils';
|
import { isFunc, isArray, isUnd } from 'Common/Utils';
|
||||||
import { data as GlobalsData } from 'Common/Globals';
|
import { data as GlobalsData } from 'Common/Globals';
|
||||||
import * as Settings from 'Storage/Settings';
|
import * as Settings from 'Storage/Settings';
|
||||||
|
|
@ -27,7 +26,7 @@ export function addHook(name, callback) {
|
||||||
*/
|
*/
|
||||||
export function runHook(name, args = []) {
|
export function runHook(name, args = []) {
|
||||||
if (isArray(SIMPLE_HOOKS[name])) {
|
if (isArray(SIMPLE_HOOKS[name])) {
|
||||||
_.each(SIMPLE_HOOKS[name], (callback) => {
|
SIMPLE_HOOKS[name].forEach(callback => {
|
||||||
callback(...args);
|
callback(...args);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +77,7 @@ export function addSettingsViewModelForAdmin(SettingsViewModelClass, template, l
|
||||||
*/
|
*/
|
||||||
export function runSettingsViewModelHooks(admin) {
|
export function runSettingsViewModelHooks(admin) {
|
||||||
const Knoin = require('Knoin/Knoin');
|
const Knoin = require('Knoin/Knoin');
|
||||||
_.each(admin ? ADMIN_VIEW_MODELS_HOOKS : USER_VIEW_MODELS_HOOKS, (view) => {
|
(admin ? ADMIN_VIEW_MODELS_HOOKS : USER_VIEW_MODELS_HOOKS).forEach(view => {
|
||||||
Knoin.addSettingsViewModel(view[0], view[1], view[2], view[3]);
|
Knoin.addSettingsViewModel(view[0], view[1], view[2], view[3]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class Selector {
|
||||||
this.selectedItem.subscribe((item) => {
|
this.selectedItem.subscribe((item) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
if (this.isListChecked()) {
|
if (this.isListChecked()) {
|
||||||
_.each(this.listChecked(), (subItem) => {
|
this.listChecked().forEach(subItem => {
|
||||||
subItem.checked(false);
|
subItem.checked(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ class Selector {
|
||||||
this.list.subscribe(
|
this.list.subscribe(
|
||||||
(items) => {
|
(items) => {
|
||||||
if (isArray(items)) {
|
if (isArray(items)) {
|
||||||
_.each(items, (item) => {
|
items.forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
const uid = this.getItemUid(item);
|
const uid = this.getItemUid(item);
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ class Selector {
|
||||||
if (isArray(aItems)) {
|
if (isArray(aItems)) {
|
||||||
len = aCheckedCache.length;
|
len = aCheckedCache.length;
|
||||||
|
|
||||||
_.each(aItems, (item) => {
|
aItems.forEach(item => {
|
||||||
const uid = this.getItemUid(item);
|
const uid = this.getItemUid(item);
|
||||||
uids.push(uid);
|
uids.push(uid);
|
||||||
|
|
||||||
|
|
@ -416,7 +416,7 @@ class Selector {
|
||||||
EventKeyCode.Insert === iEventKeyCode ||
|
EventKeyCode.Insert === iEventKeyCode ||
|
||||||
EventKeyCode.Space === iEventKeyCode
|
EventKeyCode.Space === iEventKeyCode
|
||||||
) {
|
) {
|
||||||
_.each(list, (item) => {
|
list.forEach(item => {
|
||||||
if (!isStop) {
|
if (!isStop) {
|
||||||
switch (iEventKeyCode) {
|
switch (iEventKeyCode) {
|
||||||
case EventKeyCode.Up:
|
case EventKeyCode.Up:
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ export function replySubjectAdd(prefix, subject) {
|
||||||
prefixIsRe = !fwd;
|
prefixIsRe = !fwd;
|
||||||
|
|
||||||
if ('' !== subject) {
|
if ('' !== subject) {
|
||||||
_.each(subject.split(':'), (part) => {
|
subject.split(':').forEach(part => {
|
||||||
const trimmedPart = trim(part);
|
const trimmedPart = trim(part);
|
||||||
if (!drop && (/^(RE|FWD)$/i.test(trimmedPart) || /^(RE|FWD)[[(][\d]+[\])]$/i.test(trimmedPart))) {
|
if (!drop && (/^(RE|FWD)$/i.test(trimmedPart) || /^(RE|FWD)[[(][\d]+[\])]$/i.test(trimmedPart))) {
|
||||||
if (!re) {
|
if (!re) {
|
||||||
|
|
@ -1072,7 +1072,7 @@ export function disposeOne(propOrValue, value) {
|
||||||
export function disposeObject(object) {
|
export function disposeObject(object) {
|
||||||
if (object) {
|
if (object) {
|
||||||
if (isArray(object.disposables)) {
|
if (isArray(object.disposables)) {
|
||||||
_.each(object.disposables, disposeOne);
|
object.disposables.forEach(disposeOne);
|
||||||
}
|
}
|
||||||
|
|
||||||
ko.utils.objectForEach(object, disposeOne);
|
ko.utils.objectForEach(object, disposeOne);
|
||||||
|
|
@ -1086,7 +1086,7 @@ export function disposeObject(object) {
|
||||||
export function delegateRunOnDestroy(objectOrObjects) {
|
export function delegateRunOnDestroy(objectOrObjects) {
|
||||||
if (objectOrObjects) {
|
if (objectOrObjects) {
|
||||||
if (isArray(objectOrObjects)) {
|
if (isArray(objectOrObjects)) {
|
||||||
_.each(objectOrObjects, (item) => {
|
objectOrObjects.forEach(item => {
|
||||||
delegateRunOnDestroy(item);
|
delegateRunOnDestroy(item);
|
||||||
});
|
});
|
||||||
} else if (objectOrObjects && objectOrObjects.onDestroy) {
|
} else if (objectOrObjects && objectOrObjects.onDestroy) {
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ export function hideScreenPopup(ViewModelClassToHide) {
|
||||||
* @param {mixed=} params = null
|
* @param {mixed=} params = null
|
||||||
*/
|
*/
|
||||||
export function vmRunHook(hookName, ViewModelClass, params = null) {
|
export function vmRunHook(hookName, ViewModelClass, params = null) {
|
||||||
_.each(ViewModelClass.__names, (name) => {
|
ViewModelClass.__names.forEach(name => {
|
||||||
runHook(hookName, [name, ViewModelClass.__vm, params]);
|
runHook(hookName, [name, ViewModelClass.__vm, params]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -309,7 +309,7 @@ export function screenOnRoute(screenName, subPart) {
|
||||||
vmScreen.__builded = true;
|
vmScreen.__builded = true;
|
||||||
|
|
||||||
if (isNonEmptyArray(vmScreen.viewModels())) {
|
if (isNonEmptyArray(vmScreen.viewModels())) {
|
||||||
_.each(vmScreen.viewModels(), (ViewModelClass) => {
|
vmScreen.viewModels().forEach(ViewModelClass => {
|
||||||
buildViewModel(ViewModelClass, vmScreen);
|
buildViewModel(ViewModelClass, vmScreen);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -328,7 +328,7 @@ export function screenOnRoute(screenName, subPart) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNonEmptyArray(currentScreen.viewModels())) {
|
if (isNonEmptyArray(currentScreen.viewModels())) {
|
||||||
_.each(currentScreen.viewModels(), (ViewModelClass) => {
|
currentScreen.viewModels().forEach(ViewModelClass => {
|
||||||
if (
|
if (
|
||||||
ViewModelClass.__vm &&
|
ViewModelClass.__vm &&
|
||||||
ViewModelClass.__dom &&
|
ViewModelClass.__dom &&
|
||||||
|
|
@ -361,7 +361,7 @@ export function screenOnRoute(screenName, subPart) {
|
||||||
runHook('screen-on-show', [currentScreen.screenName(), currentScreen]);
|
runHook('screen-on-show', [currentScreen.screenName(), currentScreen]);
|
||||||
|
|
||||||
if (isNonEmptyArray(currentScreen.viewModels())) {
|
if (isNonEmptyArray(currentScreen.viewModels())) {
|
||||||
_.each(currentScreen.viewModels(), (ViewModelClass) => {
|
currentScreen.viewModels().forEach(ViewModelClass => {
|
||||||
if (
|
if (
|
||||||
ViewModelClass.__vm &&
|
ViewModelClass.__vm &&
|
||||||
ViewModelClass.__dom &&
|
ViewModelClass.__dom &&
|
||||||
|
|
@ -399,7 +399,7 @@ export function screenOnRoute(screenName, subPart) {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
export function startScreens(screensClasses) {
|
export function startScreens(screensClasses) {
|
||||||
_.each(screensClasses, (CScreen) => {
|
screensClasses.forEach(CScreen => {
|
||||||
if (CScreen) {
|
if (CScreen) {
|
||||||
const vmScreen = new CScreen(),
|
const vmScreen = new CScreen(),
|
||||||
screenName = vmScreen ? vmScreen.screenName() : '';
|
screenName = vmScreen ? vmScreen.screenName() : '';
|
||||||
|
|
@ -414,7 +414,7 @@ export function startScreens(screensClasses) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
_.each(SCREENS, (vmScreen) => {
|
Object.values(SCREENS).forEach(vmScreen => {
|
||||||
if (vmScreen && !vmScreen.__started && vmScreen.__start) {
|
if (vmScreen && !vmScreen.__started && vmScreen.__start) {
|
||||||
vmScreen.__started = true;
|
vmScreen.__started = true;
|
||||||
vmScreen.__start();
|
vmScreen.__start();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from '_';
|
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
|
|
||||||
import { ContactPropertyType } from 'Common/Enums';
|
import { ContactPropertyType } from 'Common/Enums';
|
||||||
|
|
@ -30,7 +29,7 @@ class ContactModel extends AbstractModel {
|
||||||
email = '';
|
email = '';
|
||||||
|
|
||||||
if (isNonEmptyArray(this.properties)) {
|
if (isNonEmptyArray(this.properties)) {
|
||||||
_.each(this.properties, (property) => {
|
this.properties.forEach(property => {
|
||||||
if (property) {
|
if (property) {
|
||||||
if (ContactPropertyType.FirstName === property[0]) {
|
if (ContactPropertyType.FirstName === property[0]) {
|
||||||
name = trim(property[1] + ' ' + name);
|
name = trim(property[1] + ' ' + name);
|
||||||
|
|
@ -58,7 +57,7 @@ class ContactModel extends AbstractModel {
|
||||||
this.readOnly = !!json.ReadOnly;
|
this.readOnly = !!json.ReadOnly;
|
||||||
|
|
||||||
if (isNonEmptyArray(json.Properties)) {
|
if (isNonEmptyArray(json.Properties)) {
|
||||||
_.each(json.Properties, (property) => {
|
json.Properties.forEach(property => {
|
||||||
if (property && property.Type && isNormal(property.Value) && isNormal(property.TypeStr)) {
|
if (property && property.Type && isNormal(property.Value) && isNormal(property.TypeStr)) {
|
||||||
this.properties.push([pInt(property.Type), pString(property.Value), pString(property.TypeStr)]);
|
this.properties.push([pInt(property.Type), pString(property.Value), pString(property.TypeStr)]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import _ from '_';
|
|
||||||
|
|
||||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||||
import { isArray, isNormal, pInt, isUnd, noop } from 'Common/Utils';
|
import { isArray, isNormal, pInt, isUnd, noop } from 'Common/Utils';
|
||||||
import { ClientSideKeyName, ServerFolderType } from 'Common/Enums';
|
import { ClientSideKeyName, ServerFolderType } from 'Common/Enums';
|
||||||
|
|
@ -48,7 +46,7 @@ class PromisesUserPopulator extends AbstractBasicPromises {
|
||||||
const bDisplaySpecSetting = FolderStore.displaySpecSetting(),
|
const bDisplaySpecSetting = FolderStore.displaySpecSetting(),
|
||||||
aList = [];
|
aList = [];
|
||||||
|
|
||||||
_.each(aFolders, (oFolder) => {
|
aFolders.forEach(oFolder => {
|
||||||
if (oFolder) {
|
if (oFolder) {
|
||||||
let oCacheFolder = Cache.getFolderFromCacheList(oFolder.FullNameRaw);
|
let oCacheFolder = Cache.getFolderFromCacheList(oFolder.FullNameRaw);
|
||||||
if (!oCacheFolder) {
|
if (!oCacheFolder) {
|
||||||
|
|
|
||||||
|
|
@ -453,13 +453,13 @@ class RemoteUserAjax extends AbstractAjaxRemote {
|
||||||
|
|
||||||
if (isArray(list) && 0 < list.length) {
|
if (isArray(list) && 0 < list.length) {
|
||||||
request = false;
|
request = false;
|
||||||
_.each(list, (messageListItem) => {
|
list.forEach(messageListItem => {
|
||||||
if (!getMessageFlagsFromCache(messageListItem.folderFullNameRaw, messageListItem.uid)) {
|
if (!getMessageFlagsFromCache(messageListItem.folderFullNameRaw, messageListItem.uid)) {
|
||||||
uids.push(messageListItem.uid);
|
uids.push(messageListItem.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 < messageListItem.threads().length) {
|
if (0 < messageListItem.threads().length) {
|
||||||
_.each(messageListItem.threads(), (uid) => {
|
messageListItem.threads().forEach(uid => {
|
||||||
if (!getMessageFlagsFromCache(messageListItem.folderFullNameRaw, uid)) {
|
if (!getMessageFlagsFromCache(messageListItem.folderFullNameRaw, uid)) {
|
||||||
uids.push(uid);
|
uids.push(uid);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ class AbstractSettingsScreen extends AbstractScreen {
|
||||||
delegateRun(this.oCurrentSubScreen, 'onShow');
|
delegateRun(this.oCurrentSubScreen, 'onShow');
|
||||||
delegateRun(this.oCurrentSubScreen, 'onShowWithDelay', [], 200);
|
delegateRun(this.oCurrentSubScreen, 'onShowWithDelay', [], 200);
|
||||||
|
|
||||||
_.each(this.menu(), (item) => {
|
this.menu().forEach(item => {
|
||||||
item.selected(
|
item.selected(
|
||||||
settingsScreen &&
|
settingsScreen &&
|
||||||
settingsScreen.__rlSettingsData &&
|
settingsScreen.__rlSettingsData &&
|
||||||
|
|
@ -148,7 +148,7 @@ class AbstractSettingsScreen extends AbstractScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
onBuild() {
|
onBuild() {
|
||||||
_.each(VIEW_MODELS.settings, (SettingsViewModel) => {
|
VIEW_MODELS.settings.forEach(SettingsViewModel => {
|
||||||
if (
|
if (
|
||||||
SettingsViewModel &&
|
SettingsViewModel &&
|
||||||
SettingsViewModel.__rlSettingsData &&
|
SettingsViewModel.__rlSettingsData &&
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class MailBoxUserScreen extends AbstractScreen {
|
||||||
FolderStore.foldersInboxUnreadCount(count);
|
FolderStore.foldersInboxUnreadCount(count);
|
||||||
|
|
||||||
const email = AccountStore.email();
|
const email = AccountStore.email();
|
||||||
_.each(AccountStore.accounts(), (item) => {
|
AccountStore.accounts().forEach(item => {
|
||||||
if (item && email === item.email) {
|
if (item && email === item.email) {
|
||||||
item.count(count);
|
item.count(count);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import window from 'window';
|
import window from 'window';
|
||||||
import _ from '_';
|
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
|
|
||||||
import { StorageResultType, Notification } from 'Common/Enums';
|
import { StorageResultType, Notification } from 'Common/Enums';
|
||||||
|
|
@ -51,7 +50,7 @@ class PackagesAdminSettings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_.each(this.packages(), (item) => {
|
this.packages().forEach(item => {
|
||||||
if (item && packageToRequest && item.loading && item.loading() && packageToRequest.file === item.file) {
|
if (item && packageToRequest && item.loading && item.loading() && packageToRequest.file === item.file) {
|
||||||
packageToRequest.loading(false);
|
packageToRequest.loading(false);
|
||||||
item.loading(false);
|
item.loading(false);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class ThemesUserSettings {
|
||||||
this.oThemeAjaxRequest = null;
|
this.oThemeAjaxRequest = null;
|
||||||
|
|
||||||
this.theme.subscribe((value) => {
|
this.theme.subscribe((value) => {
|
||||||
_.each(this.themesObjects(), (theme) => {
|
this.themesObjects().forEach(theme => {
|
||||||
theme.selected(value === theme.name);
|
theme.selected(value === theme.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class AccountUserStore {
|
||||||
this.accountsUnreadCount = ko.computed(() => 0);
|
this.accountsUnreadCount = ko.computed(() => 0);
|
||||||
// this.accountsUnreadCount = ko.computed(() => {
|
// this.accountsUnreadCount = ko.computed(() => {
|
||||||
// let result = 0;
|
// let result = 0;
|
||||||
// _.each(this.accounts(), (item) => {
|
// this.accounts().forEach(item => {
|
||||||
// if (item)
|
// if (item)
|
||||||
// {
|
// {
|
||||||
// result += item.count();
|
// result += item.count();
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ class FolderUserStore {
|
||||||
timeouts = [],
|
timeouts = [],
|
||||||
inboxFolderName = getFolderInboxName(),
|
inboxFolderName = getFolderInboxName(),
|
||||||
fSearchFunction = (list) => {
|
fSearchFunction = (list) => {
|
||||||
_.each(list, (folder) => {
|
list.forEach(folder => {
|
||||||
if (
|
if (
|
||||||
folder &&
|
folder &&
|
||||||
inboxFolderName !== folder.fullNameRaw &&
|
inboxFolderName !== folder.fullNameRaw &&
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ class MessageUserStore {
|
||||||
|
|
||||||
this.messageListCheckedOrSelectedUidsWithSubMails = ko.computed(() => {
|
this.messageListCheckedOrSelectedUidsWithSubMails = ko.computed(() => {
|
||||||
let result = [];
|
let result = [];
|
||||||
_.each(this.messageListCheckedOrSelected(), (message) => {
|
this.messageListCheckedOrSelected().forEach(message => {
|
||||||
if (message) {
|
if (message) {
|
||||||
result.push(message.uid);
|
result.push(message.uid);
|
||||||
if (1 < message.threadsLen()) {
|
if (1 < message.threadsLen()) {
|
||||||
|
|
@ -184,7 +184,7 @@ class MessageUserStore {
|
||||||
|
|
||||||
this.messageList.subscribe(
|
this.messageList.subscribe(
|
||||||
_.debounce((list) => {
|
_.debounce((list) => {
|
||||||
_.each(list, (item) => {
|
list.forEach(item => {
|
||||||
if (item && item.newForAnimation()) {
|
if (item && item.newForAnimation()) {
|
||||||
item.newForAnimation(false);
|
item.newForAnimation(false);
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +248,7 @@ class MessageUserStore {
|
||||||
initUidNextAndNewMessages(folder, uidNext, newMessages) {
|
initUidNextAndNewMessages(folder, uidNext, newMessages) {
|
||||||
if (getFolderInboxName() === folder && isNormal(uidNext) && '' !== uidNext) {
|
if (getFolderInboxName() === folder && isNormal(uidNext) && '' !== uidNext) {
|
||||||
if (isArray(newMessages) && 0 < newMessages.length) {
|
if (isArray(newMessages) && 0 < newMessages.length) {
|
||||||
_.each(newMessages, (item) => {
|
newMessages.forEach(item => {
|
||||||
addNewMessageCache(folder, item.Uid);
|
addNewMessageCache(folder, item.Uid);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ class MessageUserStore {
|
||||||
{ 'Folder': '', 'Uid': '' }
|
{ 'Folder': '', 'Uid': '' }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
_.each(newMessages, (item) => {
|
newMessages.forEach(item => {
|
||||||
NotificationStore.displayDesktopNotification(
|
NotificationStore.displayDesktopNotification(
|
||||||
notificationMailIcon(),
|
notificationMailIcon(),
|
||||||
MessageHelper.emailArrayToString(MessageHelper.emailArrayFromJson(item.From), false),
|
MessageHelper.emailArrayToString(MessageHelper.emailArrayFromJson(item.From), false),
|
||||||
|
|
@ -310,7 +310,7 @@ class MessageUserStore {
|
||||||
? messageList.filter(item => item && uidForRemove.includes(pInt(item.uid)))
|
? messageList.filter(item => item && uidForRemove.includes(pInt(item.uid)))
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
_.each(messages, (item) => {
|
messages.forEach(item => {
|
||||||
if (item && item.unseen()) {
|
if (item && item.unseen()) {
|
||||||
unseenCount += 1;
|
unseenCount += 1;
|
||||||
}
|
}
|
||||||
|
|
@ -343,13 +343,13 @@ class MessageUserStore {
|
||||||
|
|
||||||
if (0 < messages.length) {
|
if (0 < messages.length) {
|
||||||
if (copy) {
|
if (copy) {
|
||||||
_.each(messages, (item) => {
|
messages.forEach(item => {
|
||||||
item.checked(false);
|
item.checked(false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.messageListIsNotCompleted(true);
|
this.messageListIsNotCompleted(true);
|
||||||
|
|
||||||
_.each(messages, (item) => {
|
messages.forEach(item => {
|
||||||
if (currentMessage && currentMessage.hash === item.hash) {
|
if (currentMessage && currentMessage.hash === item.hash) {
|
||||||
currentMessage = null;
|
currentMessage = null;
|
||||||
this.message(null);
|
this.message(null);
|
||||||
|
|
@ -359,7 +359,7 @@ class MessageUserStore {
|
||||||
});
|
});
|
||||||
|
|
||||||
_.delay(() => {
|
_.delay(() => {
|
||||||
_.each(messages, (item) => {
|
messages.forEach(item => {
|
||||||
this.messageList.remove(item);
|
this.messageList.remove(item);
|
||||||
});
|
});
|
||||||
}, Magics.Time350ms);
|
}, Magics.Time350ms);
|
||||||
|
|
@ -756,7 +756,7 @@ class MessageUserStore {
|
||||||
clearMessageFlagsFromCacheByFolder(folder.fullNameRaw);
|
clearMessageFlagsFromCacheByFolder(folder.fullNameRaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.each(data.Result['@Collection'], (jsonMessage) => {
|
data.Result['@Collection'].forEach(jsonMessage => {
|
||||||
if (jsonMessage && 'Object/Message' === jsonMessage['@Object']) {
|
if (jsonMessage && 'Object/Message' === jsonMessage['@Object']) {
|
||||||
const message = MessageModel.newInstanceFromJson(jsonMessage);
|
const message = MessageModel.newInstanceFromJson(jsonMessage);
|
||||||
if (message) {
|
if (message) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from '_';
|
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
|
|
||||||
import { trim } from 'Common/Utils';
|
import { trim } from 'Common/Utils';
|
||||||
|
|
@ -56,7 +55,7 @@ class AdvancedSearchPopupView extends AbstractViewNext {
|
||||||
|
|
||||||
parseSearchStringValue(search) {
|
parseSearchStringValue(search) {
|
||||||
const parts = (search || '').split(/[\s]+/g);
|
const parts = (search || '').split(/[\s]+/g);
|
||||||
_.each(parts, (part) => {
|
parts.forEach(part => {
|
||||||
switch (part) {
|
switch (part) {
|
||||||
case 'has:attachment':
|
case 'has:attachment':
|
||||||
this.hasAttachment(true);
|
this.hasAttachment(true);
|
||||||
|
|
|
||||||
|
|
@ -588,7 +588,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_.each(identities, (item, index) => {
|
identities.forEach((item, index) => {
|
||||||
identitiesCache[item.email()] = [item, index];
|
identitiesCache[item.email()] = [item, index];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -600,13 +600,13 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
case ComposeType.ReplyAll:
|
case ComposeType.ReplyAll:
|
||||||
case ComposeType.Forward:
|
case ComposeType.Forward:
|
||||||
case ComposeType.ForwardAsAttachment:
|
case ComposeType.ForwardAsAttachment:
|
||||||
_.each(_.union(message.to, message.cc, message.bcc), fEachHelper);
|
_.union(message.to, message.cc, message.bcc).forEach(fEachHelper);
|
||||||
if (!resultIdentity) {
|
if (!resultIdentity) {
|
||||||
_.each(message.deliveredTo, fEachHelper);
|
message.deliveredTo.forEach(fEachHelper);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ComposeType.Draft:
|
case ComposeType.Draft:
|
||||||
_.each(_.union(message.from, message.replyTo), fEachHelper);
|
_.union(message.from, message.replyTo).forEach(fEachHelper);
|
||||||
break;
|
break;
|
||||||
// no default
|
// no default
|
||||||
}
|
}
|
||||||
|
|
@ -775,7 +775,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moments && 0 < moments.length) {
|
if (moments && 0 < moments.length) {
|
||||||
_.each(moments, (data) => {
|
moments.forEach(data => {
|
||||||
signature = signature.replace(data[0], momentorFormat(0, data[1]));
|
signature = signature.replace(data[0], momentorFormat(0, data[1]));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1112,7 +1112,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
this.setFocusInPopup();
|
this.setFocusInPopup();
|
||||||
});
|
});
|
||||||
} else if (isNonEmptyArray(oMessageOrArray)) {
|
} else if (isNonEmptyArray(oMessageOrArray)) {
|
||||||
_.each(oMessageOrArray, (item) => {
|
oMessageOrArray.forEach(item => {
|
||||||
this.addMessageAsAttachment(item);
|
this.addMessageAsAttachment(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1151,7 +1151,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
onMessageUploadAttachments(sResult, oData) {
|
onMessageUploadAttachments(sResult, oData) {
|
||||||
if (StorageResultType.Success === sResult && oData && oData.Result) {
|
if (StorageResultType.Success === sResult && oData && oData.Result) {
|
||||||
if (!this.viewModelVisibility()) {
|
if (!this.viewModelVisibility()) {
|
||||||
_.each(oData.Result, (id, tempName) => {
|
oData.Result.forEach((id, tempName) => {
|
||||||
const attachment = this.getAttachmentById(id);
|
const attachment = this.getAttachmentById(id);
|
||||||
if (attachment) {
|
if (attachment) {
|
||||||
attachment.tempName(tempName);
|
attachment.tempName(tempName);
|
||||||
|
|
@ -1411,7 +1411,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
*/
|
*/
|
||||||
prepearAttachmentsForSendOrSave() {
|
prepearAttachmentsForSendOrSave() {
|
||||||
const result = {};
|
const result = {};
|
||||||
_.each(this.attachmentsInReady(), (item) => {
|
this.attachmentsInReady().forEach(item => {
|
||||||
if (item && '' !== item.tempName() && item.enabled()) {
|
if (item && '' !== item.tempName() && item.enabled()) {
|
||||||
result[item.tempName()] = [item.fileName(), item.isInline ? '1' : '0', item.CID, item.contentLocation];
|
result[item.tempName()] = [item.fileName(), item.isInline ? '1' : '0', item.CID, item.contentLocation];
|
||||||
}
|
}
|
||||||
|
|
@ -1474,7 +1474,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
this.addMessageAsAttachment(message);
|
this.addMessageAsAttachment(message);
|
||||||
} else {
|
} else {
|
||||||
const attachments = message.attachments();
|
const attachments = message.attachments();
|
||||||
_.each(isNonEmptyArray(attachments) ? attachments : [], (item) => {
|
(isNonEmptyArray(attachments) ? attachments : []).forEach(item => {
|
||||||
let add = false;
|
let add = false;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ComposeType.Reply:
|
case ComposeType.Reply:
|
||||||
|
|
@ -1524,7 +1524,7 @@ class ComposePopupView extends AbstractViewNext {
|
||||||
}
|
}
|
||||||
|
|
||||||
setMessageAttachmentFailedDownloadText() {
|
setMessageAttachmentFailedDownloadText() {
|
||||||
_.each(this.attachments(), (attachment) => {
|
this.attachments().forEach(attachment => {
|
||||||
if (attachment && attachment.fromMessage) {
|
if (attachment && attachment.fromMessage) {
|
||||||
attachment
|
attachment
|
||||||
.waiting(false)
|
.waiting(false)
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
|
||||||
} else if (this.encryptKeys()) {
|
} else if (this.encryptKeys()) {
|
||||||
aPublicKeys = [];
|
aPublicKeys = [];
|
||||||
|
|
||||||
_.each(this.encryptKeys(), (oKey) => {
|
this.encryptKeys().forEach(oKey => {
|
||||||
if (oKey && oKey.key) {
|
if (oKey && oKey.key) {
|
||||||
aPublicKeys = aPublicKeys.concat(_.compact(_.flatten(oKey.key.getNativeKeys())));
|
aPublicKeys = aPublicKeys.concat(_.compact(_.flatten(oKey.key.getNativeKeys())));
|
||||||
} else if (oKey && oKey.email) {
|
} else if (oKey && oKey.email) {
|
||||||
|
|
@ -279,7 +279,7 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
|
||||||
|
|
||||||
@command()
|
@command()
|
||||||
updateCommand() {
|
updateCommand() {
|
||||||
_.each(this.encryptKeys(), (oKey) => {
|
this.encryptKeys().forEach(oKey => {
|
||||||
oKey.removable(!this.sign() || !this.signKey() || this.signKey().key.id !== oKey.key.id);
|
oKey.removable(!this.sign() || !this.signKey() || this.signKey().key.id !== oKey.key.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ class ContactsPopupView extends AbstractViewNext {
|
||||||
const requestUid = fakeMd5(),
|
const requestUid = fakeMd5(),
|
||||||
properties = [];
|
properties = [];
|
||||||
|
|
||||||
_.each(this.viewProperties(), (oItem) => {
|
this.viewProperties().forEach(oItem => {
|
||||||
if (oItem.type() && oItem.type() !== ContactPropertyType.FullName && '' !== trim(oItem.value())) {
|
if (oItem.type() && oItem.type() !== ContactPropertyType.FullName && '' !== trim(oItem.value())) {
|
||||||
properties.push([oItem.type(), oItem.value(), oItem.typeStr()]);
|
properties.push([oItem.type(), oItem.value(), oItem.typeStr()]);
|
||||||
}
|
}
|
||||||
|
|
@ -456,7 +456,7 @@ class ContactsPopupView extends AbstractViewNext {
|
||||||
count = this.contacts().length;
|
count = this.contacts().length;
|
||||||
|
|
||||||
if (0 < contacts.length) {
|
if (0 < contacts.length) {
|
||||||
_.each(contacts, (contact) => {
|
contacts.forEach(contact => {
|
||||||
if (currentContact && currentContact.idContact === contact.idContact) {
|
if (currentContact && currentContact.idContact === contact.idContact) {
|
||||||
currentContact = null;
|
currentContact = null;
|
||||||
this.currentContact(null);
|
this.currentContact(null);
|
||||||
|
|
@ -471,7 +471,7 @@ class ContactsPopupView extends AbstractViewNext {
|
||||||
}
|
}
|
||||||
|
|
||||||
_.delay(() => {
|
_.delay(() => {
|
||||||
_.each(contacts, (contact) => {
|
contacts.forEach(contact => {
|
||||||
koContacts.remove(contact);
|
koContacts.remove(contact);
|
||||||
delegateRunOnDestroy(contact);
|
delegateRunOnDestroy(contact);
|
||||||
});
|
});
|
||||||
|
|
@ -523,7 +523,7 @@ class ContactsPopupView extends AbstractViewNext {
|
||||||
if (contact) {
|
if (contact) {
|
||||||
id = contact.idContact;
|
id = contact.idContact;
|
||||||
if (isNonEmptyArray(contact.properties)) {
|
if (isNonEmptyArray(contact.properties)) {
|
||||||
_.each(contact.properties, (property) => {
|
contact.properties.forEach(property => {
|
||||||
if (property && property[0]) {
|
if (property && property[0]) {
|
||||||
if (ContactPropertyType.LastName === property[0]) {
|
if (ContactPropertyType.LastName === property[0]) {
|
||||||
lastName = property[1];
|
lastName = property[1];
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class LanguagesPopupView extends AbstractViewNext {
|
||||||
|
|
||||||
setLanguageSelection() {
|
setLanguageSelection() {
|
||||||
const currentLang = this.fLang ? ko.unwrap(this.fLang) : '';
|
const currentLang = this.fLang ? ko.unwrap(this.fLang) : '';
|
||||||
_.each(this.languages(), (item) => {
|
this.languages().forEach(item => {
|
||||||
item.selected(item.key === currentLang);
|
item.selected(item.key === currentLang);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class PluginPopupView extends AbstractViewNext {
|
||||||
const list = {};
|
const list = {};
|
||||||
list.Name = this.name();
|
list.Name = this.name();
|
||||||
|
|
||||||
_.each(this.configures(), (oItem) => {
|
this.configures().forEach(oItem => {
|
||||||
let value = oItem.value();
|
let value = oItem.value();
|
||||||
if (false === value || true === value) {
|
if (false === value || true === value) {
|
||||||
value = value ? '1' : '0';
|
value = value ? '1' : '0';
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
||||||
read: () => 0 < MessageStore.messageListChecked().length,
|
read: () => 0 < MessageStore.messageListChecked().length,
|
||||||
write: (value) => {
|
write: (value) => {
|
||||||
value = !!value;
|
value = !!value;
|
||||||
_.each(MessageStore.messageList(), (message) => {
|
MessageStore.messageList().forEach(message => {
|
||||||
message.checked(value);
|
message.checked(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -551,7 +551,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
||||||
case MessageSetAction.SetSeen:
|
case MessageSetAction.SetSeen:
|
||||||
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
||||||
if (folder) {
|
if (folder) {
|
||||||
_.each(MessageStore.messageList(), (message) => {
|
MessageStore.messageList().forEach(message => {
|
||||||
if (message.unseen()) {
|
if (message.unseen()) {
|
||||||
cnt += 1;
|
cnt += 1;
|
||||||
}
|
}
|
||||||
|
|
@ -577,7 +577,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
||||||
case MessageSetAction.UnsetSeen:
|
case MessageSetAction.UnsetSeen:
|
||||||
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
||||||
if (folder) {
|
if (folder) {
|
||||||
_.each(MessageStore.messageList(), (message) => {
|
MessageStore.messageList().forEach(message => {
|
||||||
if (!message.unseen()) {
|
if (!message.unseen()) {
|
||||||
cnt += 1;
|
cnt += 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
||||||
|
|
||||||
this.showAttachmnetControls.subscribe((v) => {
|
this.showAttachmnetControls.subscribe((v) => {
|
||||||
if (this.message()) {
|
if (this.message()) {
|
||||||
_.each(this.message().attachments(), (item) => {
|
this.message().attachments().forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
item.checked(!!v);
|
item.checked(!!v);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue