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

Site goes back to first image randomly #130

Open
sander1095 opened this issue May 3, 2021 · 4 comments
Open

Site goes back to first image randomly #130

sander1095 opened this issue May 3, 2021 · 4 comments
Labels

Comments

@sander1095
Copy link

Hello!

I have a difficult time reproducing this, so I apologize for a vague issue..

I use Firefox on my OnePlus 6T. Whenever I use your (amazing) site, sometimes when I swipe to the next image it just goes back to the first image.

Sometimes it takes 20 images, sometimes only 3.

What other info can I give you to help you figure this out?

@ubershmekel
Copy link
Owner

Is it reaching the end and rotating back to the start? How often does it happen?

@ubershmekel ubershmekel added the bug label May 3, 2021
@sander1095
Copy link
Author

Hello!

Good news, I just managed to reproduce it.

Let's say x = 35.

If there are x items loaded and I am on item X and scroll to the right before the next items are loaded, it goes back to item 1. It should wait and load x + 1 instead.

@ubershmekel
Copy link
Owner

The wrap-around functionality is for situations where the subreddit has no more images. I could perhaps start to load the next set of posts when you hit the slide before the last, not on the last slide. Just so there would be less chance of you missing. I guess you're swiping quickly compared to how fast the loading is.

@sander1095
Copy link
Author

I would suggest that wrap around only activates when there are no more images on the subreddit, and perhaps notifying the user they have been brought back to the beginning again.

Currently I am brought back to the start because the next images are not loaded yet; not because there are no more images to he loaded. This last scenario sounds like your intention but doesn't really work well.

So when someone scrolls to the next image which is not loaded yet, we have to wait unt that api call is done. If the api call returns no images, the subreddit has no more images to show so we can wrap around. If the api does return images, we load the next one.

I dont know how often images are loaded currently, but perhaps loading them 10-15 images before the current last one is accessed would prevent the user from having to wait?

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

No branches or pull requests

2 participants