1
0
mirror of https://github.com/flarum/core.git synced 2025-10-28 05:56:12 +01:00

Clean composer promises (#1439)

* Remove unused login promise code

* Make promise usage consistent across composer action methods
This commit is contained in:
Clark Winkelmann
2018-09-22 06:55:19 +02:00
committed by Toby Zerner
parent 0984979403
commit fe868af224
3 changed files with 25 additions and 27 deletions

View File

@@ -111,10 +111,20 @@ export default {
/**
* Open the composer to edit a post.
*
* @return {Promise}
*/
editAction() {
app.composer.load(new EditPostComposer({ post: this }));
const deferred = m.deferred();
const component = new EditPostComposer({ post: this });
app.composer.load(component);
app.composer.show();
deferred.resolve(component);
return deferred.promise;
},
/**