Fix lazy loading on the genre pages (#6799)
* Fix genre tab from sorting shows randomly * Fix loading elements that have already been loaded * Fix lazyLoader for show and movie genre tabs * Reduce time window in which callback may be executed again
This commit is contained in:
committed by
GitHub
parent
da7135e77a
commit
d190fdb27c
@@ -52,8 +52,14 @@ export default function (view, params, tabContent) {
|
||||
return !layoutManager.desktop;
|
||||
}
|
||||
|
||||
const fillItemsContainer = (entry) => {
|
||||
const fillItemsContainer = (entry, observer) => {
|
||||
if (!entry.isIntersecting) {
|
||||
return;
|
||||
}
|
||||
|
||||
const elem = entry.target;
|
||||
observer.unobserve(elem);
|
||||
|
||||
const id = elem.getAttribute('data-id');
|
||||
const viewStyle = this.getCurrentViewStyle();
|
||||
let limit = viewStyle == 'Thumb' || viewStyle == 'ThumbCard' ? 5 : 9;
|
||||
|
||||
@@ -52,8 +52,14 @@ export default function (view, params, tabContent) {
|
||||
return !layoutManager.desktop;
|
||||
}
|
||||
|
||||
function fillItemsContainer(entry) {
|
||||
function fillItemsContainer(entry, observer) {
|
||||
if (!entry.isIntersecting) {
|
||||
return;
|
||||
}
|
||||
|
||||
const elem = entry.target;
|
||||
observer.unobserve(elem);
|
||||
|
||||
const id = elem.getAttribute('data-id');
|
||||
const viewStyle = self.getCurrentViewStyle();
|
||||
let limit = viewStyle == 'Thumb' || viewStyle == 'ThumbCard' ? 5 : 9;
|
||||
|
||||
Reference in New Issue
Block a user