From aea1f4417a402ad0e8d46e920754cc77c2b9294f Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 28 May 2024 13:17:27 +0100 Subject: [PATCH] DEV: Remove all direction tracking from sticky-avatars code (#27224) No longer required since b6cc95a0e1fe8a96f31f4546ce33e8f2c688239d --- .../discourse/app/modifiers/sticky-avatars.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/assets/javascripts/discourse/app/modifiers/sticky-avatars.js b/app/assets/javascripts/discourse/app/modifiers/sticky-avatars.js index 6c3ec4bdef2..9d6952dcabd 100644 --- a/app/assets/javascripts/discourse/app/modifiers/sticky-avatars.js +++ b/app/assets/javascripts/discourse/app/modifiers/sticky-avatars.js @@ -18,8 +18,6 @@ export default class StickyAvatars extends Modifier { element; intersectionObserver; - direction = "⬇️"; - prevOffset = -1; constructor() { super(...arguments); @@ -71,17 +69,10 @@ export default class StickyAvatars extends Modifier { @bind _handleScroll(offset) { if (offset <= 0) { - this.direction = "⬇️"; this.element .querySelectorAll(`${TOPIC_POST_SELECTOR}.${STICKY_CLASS}`) .forEach((node) => node.classList.remove(STICKY_CLASS)); - } else if (offset > this.prevOffset) { - this.direction = "⬇️"; - } else { - this.direction = "⬆️"; } - - this.prevOffset = offset; } @bind