Sync the discussion model/post stream when posts are added/removed

This commit is contained in:
Toby Zerner
2015-05-29 18:56:29 +09:30
parent 0d1b67274d
commit 4edb95e9e2
2 changed files with 21 additions and 1 deletions

View File

@ -23,8 +23,9 @@ export default function(app) {
function deleteAction() {
this.delete();
this.discussion().pushData({removedPosts: [this.id()]});
if (app.current instanceof DiscussionPage) {
app.current.stream().removePost(this.id());
app.current.stream.removePost(this.id());
}
}