aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comments.component.ts
diff options
context:
space:
mode:
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.ts21
1 files changed, 8 insertions, 13 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 bba9f1372..df0018ec6 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
@@ -1,18 +1,13 @@
1import { Subject, Subscription } from 'rxjs'
1import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core' 2import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 3import { ActivatedRoute } from '@angular/router'
3import { ConfirmService, Notifier } from '@app/core' 4import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifier, User } from '@app/core'
4import { Subject, Subscription } from 'rxjs' 5import { HooksService } from '@app/core/plugins/hooks.service'
5import { AuthService } from '../../../core/auth' 6import { Syndication, VideoDetails } from '@app/shared/shared-main'
6import { ComponentPagination, hasMoreItems } from '../../../shared/rest/component-pagination.model' 7import { I18n } from '@ngx-translate/i18n-polyfill'
7import { User } from '../../../shared/users' 8import { VideoCommentThreadTree } from './video-comment-thread-tree.model'
8import { CommentSortField } from '../../../shared/video/sort-field.type'
9import { VideoDetails } from '../../../shared/video/video-details.model'
10import { VideoComment } from './video-comment.model' 9import { VideoComment } from './video-comment.model'
11import { VideoCommentService } from './video-comment.service' 10import { VideoCommentService } from './video-comment.service'
12import { I18n } from '@ngx-translate/i18n-polyfill'
13import { Syndication } from '@app/shared/video/syndication.model'
14import { HooksService } from '@app/core/plugins/hooks.service'
15import { VideoCommentThreadTree } from '@app/videos/+video-watch/comment/video-comment-thread-tree.model'
16 11
17@Component({ 12@Component({
18 selector: 'my-video-comments', 13 selector: 'my-video-comments',
@@ -28,7 +23,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
28 23
29 comments: VideoComment[] = [] 24 comments: VideoComment[] = []
30 highlightedThread: VideoComment 25 highlightedThread: VideoComment
31 sort: CommentSortField = '-createdAt' 26 sort = '-createdAt'
32 componentPagination: ComponentPagination = { 27 componentPagination: ComponentPagination = {
33 currentPage: 1, 28 currentPage: 1,
34 itemsPerPage: 10, 29 itemsPerPage: 10,
@@ -154,7 +149,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
154 this.viewReplies(commentTree.comment.id) 149 this.viewReplies(commentTree.comment.id)
155 } 150 }
156 151
157 handleSortChange (sort: CommentSortField) { 152 handleSortChange (sort: string) {
158 if (this.sort === sort) return 153 if (this.sort === sort) return
159 154
160 this.sort = sort 155 this.sort = sort