correctly detect if there if we need to load more movies/shows

This commit is contained in:
tidusjar 2020-09-19 00:46:20 +01:00
commit 955fa7e262

View file

@ -67,7 +67,7 @@ export class DiscoverComponent implements OnInit {
break; break;
} }
this.contentLoaded = 12; this.contentLoaded = this.amountToLoad;
this.createInitialModel(); this.createInitialModel();
this.scrollDisabled = false; this.scrollDisabled = false;
@ -309,9 +309,8 @@ export class DiscoverComponent implements OnInit {
} }
private containerHasScrollBar(): boolean { private containerHasScrollBar(): boolean {
return return this.container.documentElement.scrollHeight > this.container.documentElement.clientHeight;
// div.scrollHeight > div.clientHeight; // div.scrollHeight > div.clientHeight;
this.container.documentElement.scrollHeight > this.container.documentElement.clientHeight;
// this.container.documentElement.scrollHeight > (window.innerHeight + window.pageYOffset); // this.container.documentElement.scrollHeight > (window.innerHeight + window.pageYOffset);
} }
} }