You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an edge case in infinite scrolling where posts could have been added or removed after the page has been loaded, potentially causing duplicate posts to show up or posts to be skipped.
🔄 To Reproduce
Start infinite scrolling at least once segment
Create or remove a news post (in a separate tab/window)
Infinite scroll another segment
📷 Screenshots
No response
💡 Additional context
I see two potential solutions to this:
Store when the page was loaded, and filter on posts that were added afterwards
This only mitigates the effects of creation, and not deletion
Store which news post was loaded last and get posts after that for the next segment
If basing this off timestamps, there could be problems with duplicated or skipped posts. This could occur if two (or more) timestamps are equal, which could happen for example if two posts are scheduled for the same time.
If basing this off post IDs, assuming IDs not ascending, there could be similar issues if the stored post ID was deleted.
The text was updated successfully, but these errors were encountered:
📝 Describe the bug
There is an edge case in infinite scrolling where posts could have been added or removed after the page has been loaded, potentially causing duplicate posts to show up or posts to be skipped.
🔄 To Reproduce
📷 Screenshots
No response
💡 Additional context
I see two potential solutions to this:
This only mitigates the effects of creation, and not deletion
The text was updated successfully, but these errors were encountered: