fix(discover): Fix new trending feature detection

pull/4624/head
sephrat 2 years ago
parent a373359ae8
commit 6794b887f6

@ -38,6 +38,7 @@ export class CarouselListComponent implements OnInit {
public loadingFlag: boolean;
public DiscoverType = DiscoverType;
public is4kEnabled = false;
public isNewTrendingSourceEnabled = false;
get mediaTypeStorageKey() {
return "DiscoverOptions" + this.discoverType.toString();
@ -139,6 +140,7 @@ export class CarouselListComponent implements OnInit {
public async ngOnInit() {
this.is4kEnabled = this.featureFacade.is4kEnabled();
this.isNewTrendingSourceEnabled = this.featureFacade.isNewTrendingSourceEnabled();
this.currentlyLoaded = 0;
const localDiscoverOptions = +this.storageService.get(this.mediaTypeStorageKey);
if (localDiscoverOptions) {
@ -224,7 +226,7 @@ export class CarouselListComponent implements OnInit {
this.movies = await this.searchService.popularMoviesByPage(this.currentlyLoaded, this.amountToLoad);
break;
case DiscoverType.Trending:
if(this.featureFacade.isNewTrendingSourceEnabled) {
if(this.isNewTrendingSourceEnabled) {
this.movies = await this.searchService.trendingMoviesByPage(this.currentlyLoaded, this.amountToLoad);
} else {
this.movies = await this.searchService.nowPlayingMoviesByPage(this.currentlyLoaded, this.amountToLoad);

Loading…
Cancel
Save