From 1145d204edda74d509d25dc4f734046e1971dbb0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 16 Feb 2016 15:21:44 -0500 Subject: [PATCH] FIX: Editing a post wasn't refreshing properly --- .../javascripts/discourse/controllers/composer.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index f94997198..e2adfe819 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -288,8 +288,12 @@ export default Ember.Controller.extend({ if (result.responseJson.action === "create_post" || self.get('replyAsNewTopicDraft')) { self.destroyDraft(); } + if (self.get('model.action') === 'edit') { + self.appEvents.trigger('post-stream:refresh', { id: parseInt(result.responseJson.id) }); + } else { + self.appEvents.trigger('post-stream:refresh'); + } - self.appEvents.trigger('post-stream:refresh'); if (result.responseJson.action === "create_post") { self.appEvents.trigger('post:highlight', result.payload.post_number); }