Infinite cards loading on public boards

Fixes: #4024
This commit is contained in:
Martin Filser 2021-10-12 18:34:40 +02:00
parent 1b06997001
commit a47c0dd512

View file

@ -789,17 +789,12 @@ BlazeComponent.extendComponent({
return false;
}
const spinnerViewPosition = this.spinner.offsetTop - this.container.offsetTop + this.spinner.clientHeight;
const parentViewHeight = this.container.clientHeight;
const bottomViewPosition = this.container.scrollTop + parentViewHeight;
let spinnerOffsetTop = this.spinner.offsetTop;
const addCard = $(this.container).find("a.open-minicard-composer").first()[0];
if (addCard !== undefined) {
spinnerOffsetTop -= addCard.clientHeight;
}
return bottomViewPosition > spinnerOffsetTop;
return bottomViewPosition > spinnerViewPosition;
}
getSkSpinnerName() {