ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix my videos pagination
Chocobozzza86887a4b8f1
diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.tsindex cd0f8e752d..4f2f3e2421 100644--- a/client/src/app/account/account-videos/account-videos.component.ts+++ b/client/src/app/account/account-videos/account-videos.component.ts@@ -106,6 +106,11 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit,)}+ protected buildVideoHeight () {+ // In account videos, the video height is fixed+ return this.baseVideoHeight+ }+private spliceVideosById (id: number) {for (const key of Object.keys(this.loadedPages)) {const videos = this.loadedPages[key]diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.tsindex 90a88544a6..021c285c0c 100644--- a/client/src/app/shared/video/abstract-video-list.ts+++ b/client/src/app/shared/video/abstract-video-list.ts@@ -169,6 +169,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {this.videoPages = Object.values(this.loadedPages)}+ protected buildVideoHeight () {+ // Same ratios than base width/height+ return this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)+ }+private minPageLoaded () {return Math.min(...Object.keys(this.loadedPages).map(e => parseInt(e, 10)))}@@ -183,8 +188,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {// Video takes all the widththis.videoWidth = -1- // Same ratios than base width/height- this.videoHeight = this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)+ this.videoHeight = this.buildVideoHeight()this.pageHeight = this.pagination.itemsPerPage * this.videoHeight} else {this.videoWidth = this.baseVideoWidth