mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -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;
|
element;
|
||||||
intersectionObserver;
|
intersectionObserver;
|
||||||
direction = "⬇️";
|
|
||||||
prevOffset = -1;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(...arguments);
|
super(...arguments);
|
||||||
@ -71,17 +69,10 @@ export default class StickyAvatars extends Modifier {
|
|||||||
@bind
|
@bind
|
||||||
_handleScroll(offset) {
|
_handleScroll(offset) {
|
||||||
if (offset <= 0) {
|
if (offset <= 0) {
|
||||||
this.direction = "⬇️";
|
|
||||||
this.element
|
this.element
|
||||||
.querySelectorAll(`${TOPIC_POST_SELECTOR}.${STICKY_CLASS}`)
|
.querySelectorAll(`${TOPIC_POST_SELECTOR}.${STICKY_CLASS}`)
|
||||||
.forEach((node) => node.classList.remove(STICKY_CLASS));
|
.forEach((node) => node.classList.remove(STICKY_CLASS));
|
||||||
} else if (offset > this.prevOffset) {
|
|
||||||
this.direction = "⬇️";
|
|
||||||
} else {
|
|
||||||
this.direction = "⬆️";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prevOffset = offset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@bind
|
@bind
|
||||||
|
Loading…
Reference in New Issue
Block a user