Fixed soemthing....

This commit is contained in:
tidusjar 2021-01-22 22:22:32 +00:00
commit 28ab87ad80
2 changed files with 3 additions and 11 deletions

View file

@ -6,15 +6,8 @@
</mat-button-toggle-group>
</div>
<p-carousel *ngIf="!loadingFlag" [numVisible]="10" [numScroll]="10" [page]="0" [value]="discoverResults" [responsiveOptions]="responsiveOptions">
<p-carousel [numVisible]="10" [numScroll]="10" [page]="0" [value]="discoverResults" [responsiveOptions]="responsiveOptions">
<ng-template let-result pTemplate="item">
<discover-card [result]="result"></discover-card>
</ng-template>
</p-carousel>
<div *ngIf="loadingFlag">
<p-carousel [numVisible]="10" [numScroll]="10" [page]="0" [value]="[0,1,2,3,4,5,6,7,8,9,10,11,12,13]" [responsiveOptions]="responsiveOptions">
<ng-template let-result pTemplate="item">
<p-skeleton *ngIf="!fullyLoaded" width="100%" height="315px" borderRadius="16px" style="padding: 5px;"></p-skeleton>
</ng-template>
</p-carousel>
</div>
</p-carousel>

View file

@ -96,7 +96,6 @@ export class CarouselListComponent implements OnInit {
return;
}
this.loading();
this.clear();
this.discoverOptions = newMode;
this.storageService.save(this.mediaTypeStorageKey, newMode.toString());
await this.ngOnInit();
@ -132,7 +131,6 @@ export class CarouselListComponent implements OnInit {
}
private createInitialModel() {
this.clear();
this.createModel();
}
@ -153,6 +151,7 @@ export class CarouselListComponent implements OnInit {
break;
}
this.clear();
this.discoverResults.push(...tempResults);
this.finishLoading();