mirror of
https://github.com/flarum/framework.git
synced 2025-05-24 15:49:58 +08:00
Only add a post to the post stream once
This commit is contained in:
@ -112,10 +112,13 @@ export default class PostStream {
|
||||
})
|
||||
}
|
||||
|
||||
// @todo rename to pushPost
|
||||
addPostToEnd(post) {
|
||||
var index = this.ids.length
|
||||
this.ids.push(post.id())
|
||||
this.content.push(this.makeItem(index, index, post))
|
||||
if (this.ids.indexOf(post.id()) === -1) {
|
||||
var index = this.ids.length;
|
||||
this.ids.push(post.id());
|
||||
this.content.push(this.makeItem(index, index, post));
|
||||
}
|
||||
}
|
||||
|
||||
removePost(id) {
|
||||
|
Reference in New Issue
Block a user