25
submitted 1 year ago* (last edited 1 year ago) by GrassrootBoundaries@slrpnk.net to c/lemmy@lemmy.ml

In case this is an app issue, i'm on eternity. Unlikely to be an instance issue i've noticed this several times on my alt too.

you are viewing a single comment's thread
view the rest of the comments
[-] dandroid@dandroid.app 2 points 1 year ago

Oh, that's probably the app. So, the way Android does infinite scroll, it takes a lot of resources to create a "view" (the thing that holds the details of a post), so as you scroll, when a view goes off screen, it gets reused instead of destroying it and creating a new one. This is called a recycler view. When a view gets recycled, it is supposed to replace the details that are unique to each post (title, image, etc.) and keep any other detais (any text that might be common to all posts, any sub views like upvote and downvote, etc.). But if your logic isn't right, sometimes something might get kept instead of replaced when the view is recycled.

I remember making this mistake the first time I used a recycler view back when I was working on my senior project in college, many years ago now. I don't remember how I fixed it or the exact details around why it happened, but I know that I did fix it at one point.

[-] GrassrootBoundaries@slrpnk.net 2 points 1 year ago

That's super interesting, thanks

this post was submitted on 08 Oct 2023
25 points (96.3% liked)

Lemmy

11948 readers
12 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 4 years ago
MODERATORS