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 | 6 |
1 files changed, 5 insertions, 1 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 64bd18072..a3e5ed880 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,7 +1,7 @@ | |||
1 | import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 2 | import { ActivatedRoute } from '@angular/router' |
3 | import { ConfirmService, Notifier } from '@app/core' | 3 | import { ConfirmService, Notifier } from '@app/core' |
4 | import { Subscription } from 'rxjs' | 4 | import { Subject, Subscription } from 'rxjs' |
5 | import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' | 5 | import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' |
6 | import { AuthService } from '../../../core/auth' | 6 | import { AuthService } from '../../../core/auth' |
7 | import { ComponentPagination, hasMoreItems } from '../../../shared/rest/component-pagination.model' | 7 | import { ComponentPagination, hasMoreItems } from '../../../shared/rest/component-pagination.model' |
@@ -38,6 +38,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
38 | 38 | ||
39 | syndicationItems: Syndication[] = [] | 39 | syndicationItems: Syndication[] = [] |
40 | 40 | ||
41 | onDataSubject = new Subject<any[]>() | ||
42 | |||
41 | private sub: Subscription | 43 | private sub: Subscription |
42 | 44 | ||
43 | constructor ( | 45 | constructor ( |
@@ -124,6 +126,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
124 | res => { | 126 | res => { |
125 | this.comments = this.comments.concat(res.data) | 127 | this.comments = this.comments.concat(res.data) |
126 | this.componentPagination.totalItems = res.total | 128 | this.componentPagination.totalItems = res.total |
129 | |||
130 | this.onDataSubject.next(res.data) | ||
127 | }, | 131 | }, |
128 | 132 | ||
129 | err => this.notifier.error(err.message) | 133 | err => this.notifier.error(err.message) |