Bläddra i källkod

Infinite cards loading on public boards

Fixes: #4024
Martin Filser 3 år sedan
förälder
incheckning
a47c0dd512
1 ändrade filer med 3 tillägg och 8 borttagningar
  1. 3 8
      client/components/lists/listBody.js

+ 3 - 8
client/components/lists/listBody.js

@@ -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() {