Fixed soemthing....

pull/3996/head
tidusjar 4 years ago
parent 8e8927882c
commit 28ab87ad80

@ -6,15 +6,8 @@
</mat-button-toggle-group> </mat-button-toggle-group>
</div> </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"> <ng-template let-result pTemplate="item">
<discover-card [result]="result"></discover-card> <discover-card [result]="result"></discover-card>
</ng-template> </ng-template>
</p-carousel> </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>

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

Loading…
Cancel
Save