From 47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Jan 2018 10:12:36 +0100 Subject: Add ability to disable video comments --- .../app/videos/+video-watch/comment/video-comments.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/app/videos/+video-watch/comment/video-comments.component.ts') diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index f4dda9089..4d801c970 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts @@ -5,6 +5,7 @@ import { AuthService } from '../../../core/auth' import { ComponentPagination } from '../../../shared/rest/component-pagination.model' import { User } from '../../../shared/users' import { SortField } from '../../../shared/video/sort-field.type' +import { VideoDetails } from '../../../shared/video/video-details.model' import { Video } from '../../../shared/video/video.model' import { VideoComment } from './video-comment.model' import { VideoCommentService } from './video-comment.service' @@ -15,7 +16,7 @@ import { VideoCommentService } from './video-comment.service' styleUrls: ['./video-comments.component.scss'] }) export class VideoCommentsComponent implements OnInit { - @Input() video: Video + @Input() video: VideoDetails @Input() user: User comments: VideoComment[] = [] @@ -36,7 +37,9 @@ export class VideoCommentsComponent implements OnInit { ) {} ngOnInit () { - this.loadMoreComments() + if (this.video.commentsEnabled === true) { + this.loadMoreComments() + } } viewReplies (comment: VideoComment) { -- cgit v1.2.3