From: BitTube Date: Wed, 4 Mar 2020 13:03:37 +0000 (+0000) Subject: Fixing load more comments on infinite scroll (#2535) X-Git-Tag: v2.2.0-rc.1~408 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=34102d19a1b6964cd2ec747a934e2bff3962bcce;p=github%2FChocobozzz%2FPeerTube.git Fixing load more comments on infinite scroll (#2535) * Fixing load more comments on infinite scroll * Requested changes for load more comments fix * Removing extra space --- 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..a87bc16d7 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 @@ -192,10 +192,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 +218,6 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { this.componentPagination.totalItems = null this.syndicationItems = this.videoCommentService.getVideoCommentsFeeds(this.video.uuid) - this.loadMoreThreads() } }