FIX: Editing a post wasn't refreshing properly
This commit is contained in:
parent
5bc1c5130e
commit
1145d204ed
|
@ -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');
|
||||
}
|
||||
|
||||
if (result.responseJson.action === "create_post") {
|
||||
self.appEvents.trigger('post:highlight', result.payload.post_number);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue