mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
DEV: Remove all direction tracking from sticky-avatars code (#27224)
No longer required since b6cc95a0e1
This commit is contained in:
parent
63b7b598cb
commit
aea1f4417a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user