mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Revamp isPopupVisible to AbstractViewPopup.hidden
This commit is contained in:
parent
d7ed6ce423
commit
686138ae15
5 changed files with 19 additions and 18 deletions
|
|
@ -37,7 +37,7 @@ import Remote from 'Remote/User/Fetch';
|
|||
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
|
||||
import { EmailModel } from 'Model/Email';
|
||||
|
||||
import { decorateKoCommands, isPopupVisible, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
|
||||
import { FolderSystemPopupView } from 'View/Popup/FolderSystem';
|
||||
|
|
@ -549,7 +549,7 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
deleteCommand() {
|
||||
if (!isPopupVisible(AskPopupView) && this.modalVisibility()) {
|
||||
if (AskPopupView.hidden() && this.modalVisibility()) {
|
||||
showScreenPopup(AskPopupView, [
|
||||
i18n('POPUPS_ASK/DESC_WANT_DELETE_MESSAGES'),
|
||||
() => {
|
||||
|
|
@ -1113,7 +1113,7 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
tryToClosePopup() {
|
||||
if (!isPopupVisible(AskPopupView) && this.modalVisibility()) {
|
||||
if (AskPopupView.hidden() && this.modalVisibility()) {
|
||||
if (this.bSkipNextHide || (this.isEmptyForm() && !this.draftUid())) {
|
||||
this.closeCommand();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { arrayLength } from 'Common/Utils';
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { decorateKoCommands, isPopupVisible, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
import { AskPopupView } from 'View/Popup/Ask';
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ class PluginPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
tryToClosePopup() {
|
||||
if (!isPopupVisible(AskPopupView)) {
|
||||
if (AskPopupView.hidden()) {
|
||||
showScreenPopup(AskPopupView, [
|
||||
i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'),
|
||||
() => this.modalVisibility() && this.cancelCommand()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue