FIX: Editing a post wasn't refreshing properly

This commit is contained in:
Robin Ward 2016-02-16 15:21:44 -05:00
parent 5bc1c5130e
commit 1145d204ed

View file

@ -288,8 +288,12 @@ export default Ember.Controller.extend({
if (result.responseJson.action === "create_post" || self.get('replyAsNewTopicDraft')) { if (result.responseJson.action === "create_post" || self.get('replyAsNewTopicDraft')) {
self.destroyDraft(); 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") { if (result.responseJson.action === "create_post") {
self.appEvents.trigger('post:highlight', result.payload.post_number); self.appEvents.trigger('post:highlight', result.payload.post_number);
} }