Prevent hide animation when opening modal from other modal

This commit is contained in:
Alexander Skvortsov 2020-09-25 12:54:03 -04:00
parent 7fc0963e3c
commit b7593bc6a8

View File

@ -27,8 +27,13 @@ export default class Modal extends Component {
this.attrs.onshow(() => this.onready()); this.attrs.onshow(() => this.onready());
} }
onremove() { onbeforeremove() {
this.attrs.onhide(); // If the global modal state currently contains a modal,
// we've just opened up a new one, and accordingly,
// we don't need to show a hide animation.
if (!app.modal.modal) {
this.attrs.onhide();
}
} }
view() { view() {
@ -107,7 +112,7 @@ export default class Modal extends Component {
* Hide the modal. * Hide the modal.
*/ */
hide() { hide() {
this.attrs.onhide(); app.modal.close();
} }
/** /**