FIX: Clear state after creating new topic (#12615)

FIX: Clear state after creating new topic (#12615)

diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js
index 9271f2b..211b2f0 100644
--- a/app/assets/javascripts/discourse/app/controllers/composer.js
+++ b/app/assets/javascripts/discourse/app/controllers/composer.js
@@ -805,6 +805,10 @@ export default Controller.extend({
           this.appEvents.trigger("post:highlight", result.payload.post_number);
         }
 
+        if (this.get("model.draftKey") === Composer.NEW_TOPIC_KEY) {
+          this.currentUser.set("has_topic_draft", false);
+        }
+
         if (result.responseJson.route_to) {
           this.destroyDraft();
           if (result.responseJson.message) {

GitHub sha: 98ae4e28

This commit appears in #12615 which was approved by CvX. It was merged by pmusaraj.

This commit has been mentioned on Discourse Meta. There might be relevant details there: