aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comments.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-02 14:49:25 +0200
committerChocobozzz <me@florianbigard.com>2019-08-02 14:49:25 +0200
commitad453580b20056fd80b3245d4db554f5ca1a5e29 (patch)
treeed07a6dbd8bc8cd27b22cd33dabcbd3d31deea07 /client/src/app/videos/+video-watch/comment/video-comments.component.ts
parentdd570a34ff731a6cd98ef8f8bf83f234e804f6c1 (diff)
downloadPeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.tar.gz
PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.tar.zst
PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.zip
Fix infinite scroll on big screens
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.ts6
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 @@
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)