1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

Pass ModalManagerState into Modal instances instead of calling the global.

This commit is contained in:
Alexander Skvortsov
2020-09-25 13:02:10 -04:00
parent be8fe44f0b
commit 1ac09dbc4d
2 changed files with 10 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ export default class Modal extends Component {
// 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) {
if (!this.attrs.state.modal) {
this.attrs.onhide();
}
}
@@ -112,7 +112,7 @@ export default class Modal extends Component {
* Hide the modal.
*/
hide() {
app.modal.close();
this.attrs.state.close();
}
/**