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