Drop the ko.bindingHandlers.modal as click.koModal is never used

And replace hideScreenPopup() with this.closeCommand();
This commit is contained in:
djmaze 2021-11-06 22:08:45 +01:00
parent 2e34f98c80
commit 880d4a05e9
30 changed files with 66 additions and 69 deletions

View file

@ -35,7 +35,7 @@ import Remote from 'Remote/User/Fetch';
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
import { decorateKoCommands, isPopupVisible, showScreenPopup, hideScreenPopup } from 'Knoin/Knoin';
import { decorateKoCommands, isPopupVisible, showScreenPopup } from 'Knoin/Knoin';
import { AbstractViewPopup } from 'Knoin/AbstractViews';
import { FolderSystemPopupView } from 'View/Popup/FolderSystem';
@ -500,7 +500,7 @@ class ComposePopupView extends AbstractViewPopup {
() => {
if (this.modalVisibility()) {
rl.app.deleteMessagesFromFolderWithoutCheck(this.draftFolder(), [this.draftUid()]);
hideScreenPopup(ComposePopupView);
this.closeCommand();
}
}
]);
@ -1064,9 +1064,7 @@ class ComposePopupView extends AbstractViewPopup {
} else {
showScreenPopup(AskPopupView, [
i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'),
() => {
this.modalVisibility() && this.closeCommand();
}
() => this.closeCommand()
]);
}
}

View file

@ -23,7 +23,7 @@ import { EmailModel } from 'Model/Email';
import { ContactModel } from 'Model/Contact';
import { ContactPropertyModel, ContactPropertyType } from 'Model/ContactProperty';
import { decorateKoCommands, hideScreenPopup } from 'Knoin/Knoin';
import { decorateKoCommands } from 'Knoin/Knoin';
import { AbstractViewPopup } from 'Knoin/AbstractViews';
const CONTACTS_PER_PAGE = 50,
@ -183,7 +183,7 @@ class ContactsPopupView extends AbstractViewPopup {
if (arrayLength(aE)) {
this.bBackToCompose = false;
hideScreenPopup(ContactsPopupView);
this.closeCommand();
switch (this.sLastComposeFocusedField) {
case 'cc':