DEV: Remove all direction tracking from sticky-avatars code (#27224)

No longer required since b6cc95a0e1
This commit is contained in:
David Taylor 2024-05-28 13:17:27 +01:00 committed by GitHub
parent 63b7b598cb
commit aea1f4417a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 9 deletions

View File

@ -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