don't repeat comments (#1986)
This commit is contained in:
parent
d21a7f1c24
commit
3c364ae194
|
@ -274,9 +274,13 @@ export default Vue.extend({
|
|||
})
|
||||
|
||||
if (index !== null) {
|
||||
this.commentData[index].replies = this.commentData[index].replies.concat(commentData)
|
||||
this.commentData[index].replyToken = response.continuation
|
||||
this.commentData[index].showReplies = true
|
||||
if (this.commentData[index].replies.length === 0 || this.commentData[index].replies[this.commentData[index].replies.length - 1].commentId !== commentData[commentData.length - 1].commentId) {
|
||||
this.commentData[index].replies = this.commentData[index].replies.concat(commentData)
|
||||
this.commentData[index].replyToken = response.continuation
|
||||
this.commentData[index].showReplies = true
|
||||
} else {
|
||||
console.log('Don\'t display comments twice')
|
||||
}
|
||||
} else {
|
||||
if (this.sortingChanged) {
|
||||
this.commentData = []
|
||||
|
|
Loading…
Reference in New Issue