Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent neverEndingComments from loading duplicate comments #5425

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guanzo
Copy link

@guanzo guanzo commented Nov 12, 2022

Relevant issue: https://www.reddit.com/r/Enhancement/comments/l1boqd/comments_duplicating_in_never_ending_reddit/
Tested in browser: chrome, firefox

To reproduce:

  1. scroll to bottom of page, wait for /api/morechildren request to send
  2. scroll up until the red loading... text exits the bottom of the viewport
  3. scroll back down. A 2nd /api/morechildren request should be sent, causing duplicate comments.

Solution is to ensure that the same loader link is never clicked twice.

My implementation checks if the loader link has the loading text, if so then ignore it.

It works, but will there be any issues with translations? Like will the loading text check fail for spanish users, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant