diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comments.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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' | |||
5 | import { ComponentPagination } from '../../../shared/rest/component-pagination.model' | 5 | import { ComponentPagination } from '../../../shared/rest/component-pagination.model' |
6 | import { User } from '../../../shared/users' | 6 | import { User } from '../../../shared/users' |
7 | import { SortField } from '../../../shared/video/sort-field.type' | 7 | import { SortField } from '../../../shared/video/sort-field.type' |
8 | import { VideoDetails } from '../../../shared/video/video-details.model' | ||
8 | import { Video } from '../../../shared/video/video.model' | 9 | import { Video } from '../../../shared/video/video.model' |
9 | import { VideoComment } from './video-comment.model' | 10 | import { VideoComment } from './video-comment.model' |
10 | import { VideoCommentService } from './video-comment.service' | 11 | import { VideoCommentService } from './video-comment.service' |
@@ -15,7 +16,7 @@ import { VideoCommentService } from './video-comment.service' | |||
15 | styleUrls: ['./video-comments.component.scss'] | 16 | styleUrls: ['./video-comments.component.scss'] |
16 | }) | 17 | }) |
17 | export class VideoCommentsComponent implements OnInit { | 18 | export class VideoCommentsComponent implements OnInit { |
18 | @Input() video: Video | 19 | @Input() video: VideoDetails |
19 | @Input() user: User | 20 | @Input() user: User |
20 | 21 | ||
21 | comments: VideoComment[] = [] | 22 | comments: VideoComment[] = [] |
@@ -36,7 +37,9 @@ export class VideoCommentsComponent implements OnInit { | |||
36 | ) {} | 37 | ) {} |
37 | 38 | ||
38 | ngOnInit () { | 39 | ngOnInit () { |
39 | this.loadMoreComments() | 40 | if (this.video.commentsEnabled === true) { |
41 | this.loadMoreComments() | ||
42 | } | ||
40 | } | 43 | } |
41 | 44 | ||
42 | viewReplies (comment: VideoComment) { | 45 | viewReplies (comment: VideoComment) { |