25
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 08 Oct 2023
25 points (96.3% liked)
Lemmy
11947 readers
42 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
No it was a title from a seperate post that actually existed.
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.
That's super interesting, thanks