Closed nexushoratio closed 11 months ago
This use of this.item = this.item
is just happenstance. What really matters is invoking the getter via this.item
. However, that upset the linter, so got changed to the assignment.
Part of the idea behind adding the goto() method was to replace those assignments with calls that could probably have an appropriate check, like this on in #onClick():
if (item !== this.item) {
this.item = item;
}
Though, I suspect it should actually go into #bottomHalf().
Resetting hearkens back to the days Scroller
tracked by the actual HTML element, rather than the uid.
It may be the case that this really is not necessary any more.
This use also predates the existence of Scroller
, so finding the related issues is tricky.
I turned on all of my notifications again so I will have some data to work with.
Reference (https://github.com/nexushoratio/userscripts/issues/144#issuecomment-1824830905)
Due to how some
Page
s rebuild their elements internally upon loading additional content, we added some resets toScroller
in the form ofthis.item = this.item
. Do we still need them all of the time or can we make use of the MutationObserver to detect that situations that resulted in the need for them?