]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fixing load more comments on infinite scroll (#2535)
authorBitTube <hello@bittube.app>
Wed, 4 Mar 2020 13:03:37 +0000 (13:03 +0000)
committerGitHub <noreply@github.com>
Wed, 4 Mar 2020 13:03:37 +0000 (14:03 +0100)
* Fixing load more comments on infinite scroll

* Requested changes for load more comments fix

* Removing extra space

client/src/app/videos/+video-watch/comment/video-comments.component.ts

index 750c09c47cbbbe170201c7b1ada466821b23dd8a..a87bc16d7347fabe08d04d0104dea6c321acad22 100644 (file)
@@ -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()
     }
   }