]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/abstract-video-list.ts
Improve SQL query for my special playlists
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / abstract-video-list.ts
index 7463598514951c267b00fe67ba9056c7faf7c6da..3e3583a70c049c1311dd5b8d25328e9edb31c51a 100644 (file)
@@ -146,11 +146,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
     this.loadMoreVideos()
   }
 
-  loadMoreVideos () {
+  loadMoreVideos (reset = false) {
     this.getVideosObservable(this.pagination.currentPage).subscribe(
       ({ data, total }) => {
         this.pagination.totalItems = total
-        this.videos = []
+        if (reset) this.videos = []
         this.videos = this.videos.concat(data)
 
         if (this.groupByDate) this.buildGroupedDateLabels()
@@ -171,7 +171,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
 
   reloadVideos () {
     this.pagination.currentPage = 1
-    this.loadMoreVideos()
+    this.loadMoreVideos(true)
   }
 
   toggleModerationDisplay () {