Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove unused `screenNotFull` code (#26979)

Jarek Radosz38bd0b3f8620
diff --git a/app/assets/javascripts/discourse/app/mixins/load-more.js b/app/assets/javascripts/discourse/app/mixins/load-more.js
index 151bcae7e5b..a64c4e0931e 100644
--- a/app/assets/javascripts/discourse/app/mixins/load-more.js
+++ b/app/assets/javascripts/discourse/app/mixins/load-more.js
@@ -9,12 +9,6 @@ export default Mixin.create(Scrolling, {
return this.eyeline?.update();
},
- loadMoreUnlessFull() {
- if (this.screenNotFull()) {
- this.send("loadMore");
- }
- },
-
@on("didInsertElement")
_bindEyeline() {
const eyeline = Eyeline.create({
diff --git a/app/assets/javascripts/discourse/app/mixins/scrolling.js b/app/assets/javascripts/discourse/app/mixins/scrolling.js
index bb404b2634a..91801214323 100644
--- a/app/assets/javascripts/discourse/app/mixins/scrolling.js
+++ b/app/assets/javascripts/discourse/app/mixins/scrolling.js
@@ -17,12 +17,6 @@ const ScrollingDOMMethods = {
document.removeEventListener("touchmove", onScrollMethod);
window.removeEventListener("scroll", onScrollMethod);
},
-
- screenNotFull() {
- return (
- window.height > document.querySelector(".ember-application").offsetHeight
- );
- },
};
const Scrolling = Mixin.create({
@@ -59,8 +53,6 @@ const Scrolling = Mixin.create({
ScrollingDOMMethods.bindOnScroll(onScrollMethod);
},
- screenNotFull: () => ScrollingDOMMethods.screenNotFull(),
-
unbindScrolling() {
ScrollingDOMMethods.unbindOnScroll(this._scrollingMixinOnScrollMethod);
},
diff --git a/app/assets/javascripts/discourse/tests/setup-tests.js b/app/assets/javascripts/discourse/tests/setup-tests.js
index 63e87609e2b..5dcc5c144c7 100644
--- a/app/assets/javascripts/discourse/tests/setup-tests.js
+++ b/app/assets/javascripts/discourse/tests/setup-tests.js
@@ -338,7 +338,6 @@ export default function setupTests(config) {
resetCategoryCache();
- sinon.stub(ScrollingDOMMethods, "screenNotFull");
sinon.stub(ScrollingDOMMethods, "bindOnScroll");
sinon.stub(ScrollingDOMMethods, "unbindOnScroll");
});