X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fcomment%2Fvideo-comments.component.ts;h=910a1761c9e5af8d9d59d6b6779f20f0b6b8bafe;hb=25ae4f957252842d9e2e55960a3b6b87d22544b7;hp=750c09c47cbbbe170201c7b1ada466821b23dd8a;hpb=c2777c1dfe688c8fab1ef2fed50e360100fa9198;p=github%2FChocobozzz%2FPeerTube.git 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 750c09c47..910a1761c 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 @@ -130,6 +130,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { this.componentPagination.totalItems = res.total this.onDataSubject.next(res.data) + this.hooks.runAction('action:video-watch.video-threads.loaded', 'video-watch', { data: this.componentPagination }) }, err => this.notifier.error(err.message) @@ -192,10 +193,9 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { return this.authService.isLoggedIn() } - onNearOfBottom () { - this.componentPagination.currentPage++ - + onNearOfBottom () { if (hasMoreItems(this.componentPagination)) { + this.componentPagination.currentPage++ this.loadMoreThreads() } } @@ -219,7 +219,6 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { this.componentPagination.totalItems = null this.syndicationItems = this.videoCommentService.getVideoCommentsFeeds(this.video.uuid) - this.loadMoreThreads() } }