DEV: add composer cancelled event triggers (#16371)

This commit is contained in:
Jean 2022-04-04 17:38:30 -04:00 committed by GitHub
parent ec2930712d
commit e03593d75c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1331,6 +1331,7 @@ export default Controller.extend({
this.close();
})
.finally(() => {
this.appEvents.trigger("composer:cancelled");
resolve();
});
},
@ -1338,6 +1339,7 @@ export default Controller.extend({
this._saveDraft();
this.model.clearState();
this.close();
this.appEvents.trigger("composer:cancelled");
resolve();
},
// needed to resume saving drafts if composer stays open
@ -1351,6 +1353,7 @@ export default Controller.extend({
this.close();
})
.finally(() => {
this.appEvents.trigger("composer:cancelled");
resolve();
});
}