change Modal async/await signature to use raw promises
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
7fe078c07a
commit
49c7730503
2 changed files with 3 additions and 3 deletions
|
@ -274,7 +274,7 @@ class ModalManager {
|
||||||
this._reRender();
|
this._reRender();
|
||||||
return {
|
return {
|
||||||
close: closeDialog,
|
close: closeDialog,
|
||||||
then: (resolve, reject) => onFinishedProm.then(resolve, reject),
|
finished: onFinishedProm,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ class ModalManager {
|
||||||
this._reRender();
|
this._reRender();
|
||||||
return {
|
return {
|
||||||
close: closeDialog,
|
close: closeDialog,
|
||||||
then: (resolve, reject) => onFinishedProm.then(resolve, reject),
|
finished: onFinishedProm,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -935,7 +935,7 @@ export default React.createClass({
|
||||||
const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog');
|
const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog');
|
||||||
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog);
|
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog);
|
||||||
|
|
||||||
const [shouldCreate, name, noFederate] = await modal;
|
const [shouldCreate, name, noFederate] = await modal.finished;
|
||||||
if (shouldCreate) {
|
if (shouldCreate) {
|
||||||
const createOpts = {};
|
const createOpts = {};
|
||||||
if (name) createOpts.name = name;
|
if (name) createOpts.name = name;
|
||||||
|
|
Loading…
Reference in a new issue