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
1 changed files with 3 additions and 0 deletions

View File

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