diff options
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.html | 1 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.ts | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.html b/client/src/app/videos/+video-watch/comment/video-comments.component.html index 7b941454a..be20a8490 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.html | |||
@@ -21,6 +21,7 @@ | |||
21 | myInfiniteScroller | 21 | myInfiniteScroller |
22 | [autoInit]="true" | 22 | [autoInit]="true" |
23 | (nearOfBottom)="onNearOfBottom()" | 23 | (nearOfBottom)="onNearOfBottom()" |
24 | [dataObservable]="onDataSubject.asObservable()" | ||
24 | > | 25 | > |
25 | <div #commentHighlightBlock id="highlighted-comment"> | 26 | <div #commentHighlightBlock id="highlighted-comment"> |
26 | <my-video-comment | 27 | <my-video-comment |
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) |