-
- if (this.markedCommentID) {
- // If there is a marked comment, retrieve it separately as it may not be on this page, filter to prevent duplicate
- this.comments = this.comments.filter(value => value.id !== this.markedCommentID)
- this.videoCommentService.getVideoThreadComments(this.video.id, this.markedCommentID).subscribe(
- res => {
- let comment = new VideoComment(res.comment)
- comment.marked = true
- this.comments.unshift(comment) // Insert marked comment at the beginning
- }
- )
- }