aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.html1
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.ts6
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 @@
1import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core' 1import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import { ConfirmService, Notifier } from '@app/core' 3import { ConfirmService, Notifier } from '@app/core'
4import { Subscription } from 'rxjs' 4import { Subject, Subscription } from 'rxjs'
5import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' 5import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model'
6import { AuthService } from '../../../core/auth' 6import { AuthService } from '../../../core/auth'
7import { ComponentPagination, hasMoreItems } from '../../../shared/rest/component-pagination.model' 7import { 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)