Fixed a bug where there was no pagination on the dashboard and it would take some time to load (#1329)

This commit is contained in:
Joseph Milazzo 2022-06-22 14:04:07 -05:00 committed by GitHub
parent 9f4f6d03f3
commit 35ff35f8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,9 +114,9 @@ export class DashboardComponent implements OnInit, OnDestroy {
} }
loadOnDeck() { loadOnDeck() {
let api = this.seriesService.getOnDeck(); let api = this.seriesService.getOnDeck(0, 1, 30);
if (this.libraryId > 0) { if (this.libraryId > 0) {
api = this.seriesService.getOnDeck(this.libraryId); api = this.seriesService.getOnDeck(this.libraryId, 1, 30);
} }
api.pipe(takeUntil(this.onDestroy)).subscribe((updatedSeries) => { api.pipe(takeUntil(this.onDestroy)).subscribe((updatedSeries) => {
this.inProgress = updatedSeries.result; this.inProgress = updatedSeries.result;
@ -124,9 +124,9 @@ export class DashboardComponent implements OnInit, OnDestroy {
} }
loadRecentlyAddedSeries() { loadRecentlyAddedSeries() {
let api = this.seriesService.getRecentlyAdded(); let api = this.seriesService.getRecentlyAdded(0, 1, 30);
if (this.libraryId > 0) { if (this.libraryId > 0) {
api = this.seriesService.getRecentlyAdded(this.libraryId); api = this.seriesService.getRecentlyAdded(this.libraryId, 1, 30);
} }
api.pipe(takeUntil(this.onDestroy)).subscribe((updatedSeries) => { api.pipe(takeUntil(this.onDestroy)).subscribe((updatedSeries) => {
this.recentlyAddedSeries = updatedSeries.result; this.recentlyAddedSeries = updatedSeries.result;