Only add a post to the post stream once

This commit is contained in:
Toby Zerner 2015-05-02 08:44:52 +09:30
parent 4f0e620cff
commit d5a3e3d2c6

View File

@ -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) {