mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 15:19:56 +08:00
Sync the discussion model/post stream when posts are added/removed
This commit is contained in:
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user