mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: Editing a post wasn't refreshing properly
This commit is contained in:
parent
5bc1c5130e
commit
1145d204ed
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue