mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Cleanup some JavaScript
This commit is contained in:
parent
18fbf332c2
commit
24b638cd82
16 changed files with 64 additions and 88 deletions
|
|
@ -237,8 +237,6 @@ export class MailMessageList extends AbstractViewRight {
|
|||
).throttle(50));
|
||||
|
||||
decorateKoCommands(this, {
|
||||
clearCommand: 1,
|
||||
reloadCommand: 1,
|
||||
multyForwardCommand: canBeMovedHelper,
|
||||
deleteWithoutMoveCommand: canBeMovedHelper,
|
||||
deleteCommand: canBeMovedHelper,
|
||||
|
|
@ -252,16 +250,16 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
changeSort(self, event) {
|
||||
FolderUserStore.sortMode(event.target.closest('li').dataset.sort);
|
||||
this.reloadCommand();
|
||||
this.reload();
|
||||
}
|
||||
|
||||
clearCommand() {
|
||||
clear() {
|
||||
if (SettingsCapa(Capa.DangerousActions)) {
|
||||
showScreenPopup(FolderClearPopupView, [FolderUserStore.currentFolder()]);
|
||||
}
|
||||
}
|
||||
|
||||
reloadCommand() {
|
||||
reload() {
|
||||
if (!MessageUserStore.listIsLoading()) {
|
||||
rl.app.reloadMessageList(false, true);
|
||||
}
|
||||
|
|
@ -707,7 +705,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
// check mail
|
||||
shortcuts.add('r', 'meta', [Scope.FolderList, Scope.MessageList, Scope.MessageView], () => {
|
||||
this.reloadCommand();
|
||||
this.reload();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -231,14 +231,13 @@ export class MailMessageView extends AbstractViewRight {
|
|||
addEventListener('mailbox.message-view.toggle-full-screen', () => this.toggleFullScreen());
|
||||
|
||||
decorateKoCommands(this, {
|
||||
closeMessageCommand: 1,
|
||||
messageEditCommand: self => self.messageVisibility(),
|
||||
goUpCommand: self => !self.messageListOrViewLoading(),
|
||||
goDownCommand: self => !self.messageListOrViewLoading()
|
||||
});
|
||||
}
|
||||
|
||||
closeMessageCommand() {
|
||||
closeMessage() {
|
||||
MessageUserStore.message(null);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue