Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fixing load more comments on infinite scroll (#2535)

BitTube34102d19a1b6
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 750c09c47c..a87bc16d73 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()
}
}