mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
small code cleanup ()=>0 to null
This commit is contained in:
parent
c561493bd0
commit
2c363e63a0
5 changed files with 13 additions and 17 deletions
|
@ -176,10 +176,6 @@ class AppUser extends AbstractApp {
|
|||
);
|
||||
}
|
||||
|
||||
recacheInboxMessageList() {
|
||||
Remote.messageList(null, {Folder: getFolderInboxName()}, true);
|
||||
}
|
||||
|
||||
messagesMoveTrigger() {
|
||||
const sTrashFolder = FolderUserStore.trashFolder(),
|
||||
sSpamFolder = FolderUserStore.spamFolder();
|
||||
|
@ -515,7 +511,7 @@ class AppUser extends AbstractApp {
|
|||
if (folderFromCache.fullNameRaw === FolderUserStore.currentFolderFullNameRaw()) {
|
||||
this.reloadMessageList();
|
||||
} else if (getFolderInboxName() === folderFromCache.fullNameRaw) {
|
||||
this.recacheInboxMessageList();
|
||||
Remote.messageList(null, {Folder: getFolderInboxName()}, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -604,7 +600,7 @@ class AppUser extends AbstractApp {
|
|||
folder.messageCountUnread(folder.messageCountUnread() - alreadyUnread);
|
||||
}
|
||||
|
||||
Remote.messageSetSeen(()=>0, sFolderFullNameRaw, rootUids, true);
|
||||
Remote.messageSetSeen(null, sFolderFullNameRaw, rootUids, true);
|
||||
break;
|
||||
|
||||
case MessageSetAction.UnsetSeen:
|
||||
|
@ -617,7 +613,7 @@ class AppUser extends AbstractApp {
|
|||
folder.messageCountUnread(folder.messageCountUnread() - alreadyUnread + rootUids.length);
|
||||
}
|
||||
|
||||
Remote.messageSetSeen(()=>0, sFolderFullNameRaw, rootUids, false);
|
||||
Remote.messageSetSeen(null, sFolderFullNameRaw, rootUids, false);
|
||||
break;
|
||||
|
||||
case MessageSetAction.SetFlag:
|
||||
|
@ -625,7 +621,7 @@ class AppUser extends AbstractApp {
|
|||
MessageFlagsCache.storeBySetAction(sFolderFullNameRaw, sSubUid, iSetAction)
|
||||
);
|
||||
|
||||
Remote.messageSetFlagged(()=>0, sFolderFullNameRaw, rootUids, true);
|
||||
Remote.messageSetFlagged(null, sFolderFullNameRaw, rootUids, true);
|
||||
break;
|
||||
|
||||
case MessageSetAction.UnsetFlag:
|
||||
|
@ -633,7 +629,7 @@ class AppUser extends AbstractApp {
|
|||
MessageFlagsCache.storeBySetAction(sFolderFullNameRaw, sSubUid, iSetAction)
|
||||
);
|
||||
|
||||
Remote.messageSetFlagged(()=>0, sFolderFullNameRaw, rootUids, false);
|
||||
Remote.messageSetFlagged(null, sFolderFullNameRaw, rootUids, false);
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
|
@ -769,7 +765,7 @@ class AppUser extends AbstractApp {
|
|||
FolderUserStore.hasCapability('LIST-STATUS') || this.folderInformationMultiply(true);
|
||||
}, 1000);
|
||||
|
||||
setTimeout(() => Remote.appDelayStart(()=>0), 35000);
|
||||
setTimeout(() => Remote.appDelayStart(null), 35000);
|
||||
|
||||
// When auto-login is active
|
||||
if (
|
||||
|
|
|
@ -143,20 +143,20 @@ export class FoldersUserSettings /*extends AbstractViewSettings*/ {
|
|||
toggleFolderKolabType(folder, event) {
|
||||
let type = event.target.value;
|
||||
// TODO: append '.default' ?
|
||||
Remote.folderSetMetadata(()=>0, folder.fullNameRaw, FolderMetadataKeys.KolabFolderType, type);
|
||||
Remote.folderSetMetadata(null, folder.fullNameRaw, FolderMetadataKeys.KolabFolderType, type);
|
||||
folder.kolabType(type);
|
||||
}
|
||||
|
||||
toggleFolderSubscription(folder) {
|
||||
let subscribe = !folder.subscribed();
|
||||
Local.set(ClientSideKeyName.FoldersLashHash, '');
|
||||
Remote.folderSetSubscribe(()=>0, folder.fullNameRaw, subscribe);
|
||||
Remote.folderSetSubscribe(null, folder.fullNameRaw, subscribe);
|
||||
folder.subscribed(subscribe);
|
||||
}
|
||||
|
||||
toggleFolderCheckable(folder) {
|
||||
let checkable = !folder.checkable();
|
||||
Remote.folderSetCheckable(()=>0, folder.fullNameRaw, checkable);
|
||||
Remote.folderSetCheckable(null, folder.fullNameRaw, checkable);
|
||||
folder.checkable(checkable);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,6 +171,6 @@ export const FolderUserStore = new class {
|
|||
ArchiveFolder: FolderUserStore.archiveFolder()
|
||||
};
|
||||
Object.entries(folders).forEach(([k,v])=>Settings.set(k,v));
|
||||
rl.app.Remote.saveSystemFolders(()=>0, folders);
|
||||
rl.app.Remote.saveSystemFolders(null, folders);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -490,7 +490,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
MessageFlagsCache.clearFolder(sFolderFullNameRaw);
|
||||
}
|
||||
|
||||
Remote.messageSetSeenToAll(()=>0, sFolderFullNameRaw, true, iThreadUid ? uids : null);
|
||||
Remote.messageSetSeenToAll(null, sFolderFullNameRaw, true, iThreadUid ? uids : null);
|
||||
break;
|
||||
case MessageSetAction.UnsetSeen:
|
||||
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
||||
|
@ -516,7 +516,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
MessageFlagsCache.clearFolder(sFolderFullNameRaw);
|
||||
}
|
||||
|
||||
Remote.messageSetSeenToAll(()=>0, sFolderFullNameRaw, false, iThreadUid ? uids : null);
|
||||
Remote.messageSetSeenToAll(null, sFolderFullNameRaw, false, iThreadUid ? uids : null);
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
|
|
|
@ -609,7 +609,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
let oMessage = MessageUserStore.message()
|
||||
if (oMessage && oMessage.readReceipt()) {
|
||||
Remote.sendReadReceiptMessage(
|
||||
()=>0,
|
||||
null,
|
||||
oMessage.folder,
|
||||
oMessage.uid,
|
||||
oMessage.readReceipt(),
|
||||
|
|
Loading…
Reference in a new issue