From e03593d75ca00f74871ae53e58070b26f47d62ce Mon Sep 17 00:00:00 2001 From: Jean Date: Mon, 4 Apr 2022 17:38:30 -0400 Subject: [PATCH] DEV: add composer cancelled event triggers (#16371) --- app/assets/javascripts/discourse/app/controllers/composer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js index 3af53452973..e45d761a98f 100644 --- a/app/assets/javascripts/discourse/app/controllers/composer.js +++ b/app/assets/javascripts/discourse/app/controllers/composer.js @@ -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(); }); }