this post was submitted on 28 Jun 2023
9 points (100.0% liked)
Connect for Lemmy App
2675 readers
1 users here now
A community for the mobile app Connect for Lemmy.
Links
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This is actually an issue with the Lemmy API that I noticed while working on my own Lemmy app. Basically pages are fetched from the api in order eg 1.2.3.4… and each of those pages can have up to 50 posts, I believe. Now say you fetch page 1, then browse for a bit before reaching page 2. Now during that time new posts were submitted, and now some of the page 1 content was pushed down to page 2. When page 2 is fetched it now contains a duplicate post from page 1 because the server doesn’t know the order or starting index from when you fetched page 1.
I think the api needs to add support for timestamps that it can be submitted with api requests so that fetching content is based on the time that page 1 was fetched.
As for this issue, if the developer is seeing this. I resolved this in my app by filtering out duplicate post ids when fetching new pages. It’s not ideal, but it’s all I could think of to do.
Yeah I think this is exactly right and I think I'll have to do what you did. Looking forward to checking out Lemming.