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

This commit is contained in:
Penar Musaraj 2021-04-06 10:17:14 -04:00 committed by GitHub
parent f56a22bd2e
commit 98ae4e2829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {