decorateKoCommands() each command must have function

And due to that, a bug is found and solved in MessageView
This commit is contained in:
the-djmaze 2022-03-03 17:34:45 +01:00
parent a67fb22bee
commit f50f2c5ea0
5 changed files with 40 additions and 49 deletions

View file

@ -366,10 +366,10 @@ export class ComposePopupView extends AbstractViewPopup {
decorateKoCommands(this, {
sendCommand: self => self.canBeSentOrSaved(),
saveCommand: self => self.canBeSentOrSaved(),
deleteCommand: self => self.isDraftFolderMessage(),
skipCommand: self => self.canBeSentOrSaved(),
contactsCommand: self => self.allowContacts
saveCommand: self => self.canBeSentOrSaved(),
deleteCommand: self => self.isDraftFolderMessage(),
skipCommand: self => self.canBeSentOrSaved(),
contactsCommand: self => self.allowContacts
});
}

View file

@ -136,6 +136,7 @@ export class ContactsPopupView extends AbstractViewPopup {
});
decorateKoCommands(this, {
// closeCommand: self => !self.watchDirty(),
deleteCommand: self => 0 < self.contactsCheckedOrSelected().length,
newMessageCommand: self => 0 < self.contactsCheckedOrSelected().length,
saveCommand: self => !self.viewSaving() && !self.viewReadOnly()