diff options
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r-- | client/src/app/shared/video/abstract-video-list.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 53b044478..6a758ebe0 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -81,6 +81,15 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
81 | if (this.resizeSubscription) this.resizeSubscription.unsubscribe() | 81 | if (this.resizeSubscription) this.resizeSubscription.unsubscribe() |
82 | } | 82 | } |
83 | 83 | ||
84 | pageByVideoId (index: number, page: Video[]) { | ||
85 | // Video are unique in all pages | ||
86 | return page[0].id | ||
87 | } | ||
88 | |||
89 | videoById (index: number, video: Video) { | ||
90 | return video.id | ||
91 | } | ||
92 | |||
84 | onNearOfTop () { | 93 | onNearOfTop () { |
85 | this.previousPage() | 94 | this.previousPage() |
86 | } | 95 | } |
@@ -166,7 +175,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
166 | const min = this.minPageLoaded() | 175 | const min = this.minPageLoaded() |
167 | 176 | ||
168 | if (min > 1) { | 177 | if (min > 1) { |
169 | this.loadMoreVideos(min - 1) | 178 | this.loadMoreVideos(min - 1, true) |
170 | } | 179 | } |
171 | } | 180 | } |
172 | 181 | ||