mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Cleanup array.length checks and for() to forEach()
This commit is contained in:
parent
db5751cd00
commit
82bed1ed80
24 changed files with 135 additions and 169 deletions
|
|
@ -346,7 +346,7 @@ class AppUser extends AbstractApp {
|
|||
}
|
||||
}
|
||||
|
||||
this.reloadMessageList(0 === MessageStore.messageList().length);
|
||||
this.reloadMessageList(!MessageStore.messageList().length);
|
||||
this.quotaDebounce();
|
||||
}
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ class AppUser extends AbstractApp {
|
|||
* @param {boolean=} bCopy = false
|
||||
*/
|
||||
moveMessagesToFolder(sFromFolderFullNameRaw, aUidForMove, sToFolderFullNameRaw, bCopy) {
|
||||
if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && isArray(aUidForMove) && 0 < aUidForMove.length) {
|
||||
if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && isArray(aUidForMove) && aUidForMove.length) {
|
||||
const oFromFolder = getFolderFromCacheList(sFromFolderFullNameRaw),
|
||||
oToFolder = getFolderFromCacheList(sToFolderFullNameRaw);
|
||||
|
||||
|
|
@ -823,7 +823,7 @@ class AppUser extends AbstractApp {
|
|||
rootUids = messages.map(oMessage => oMessage && oMessage.uid ? oMessage.uid : null)
|
||||
.filter((value, index, self) => !!value && self.indexOf(value) == index);
|
||||
|
||||
if ('' !== sFolderFullNameRaw && 0 < rootUids.length) {
|
||||
if ('' !== sFolderFullNameRaw && rootUids.length) {
|
||||
switch (iSetAction) {
|
||||
case MessageSetAction.SetSeen:
|
||||
rootUids.forEach(sSubUid => {
|
||||
|
|
@ -1001,7 +1001,7 @@ class AppUser extends AbstractApp {
|
|||
this.loginAndLogoutReload(
|
||||
false,
|
||||
true,
|
||||
Settings.settingsGet('ParentEmail') && 0 < Settings.settingsGet('ParentEmail').length
|
||||
0 < (Settings.settingsGet('ParentEmail')||{length:0}).length
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue