this post was submitted on 18 Apr 2024
9 points (100.0% liked)
Arctic
433 readers
1 users here now
Arctic is a Lemmy client for iOS built on pure Swift. It currently supports iOS 15+ and Lemmy v0.17+
Get the latest version on TestFlight, or check it out on the AppStore.
If you would like to support Arctic’s development, feel free to Buy Me A Coffee
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This isn’t so much to do with sorting and inserting posts above the current position, the posts are already loaded and displayed in order. The issue is due to loading previews (links, videos, images, etc). If the preview is not loaded in time for the cell to render it when it’s first displayed, then the cell is updated to adjust for the preview content. Usually this is not an issue because this typically happens off screen, or below the scroll position so the scroll position won’t jump.
This definitely oversimplifies the behavior, as there are a lot of performance tweaks that happen behind the scene to attempt a guarantee that the cell will be sized properly, even if the content is not fully loaded in time, etc.
Anyway, occasionally the previews will not load in time to properly size the cell while it is below the focal point of the screen, and it causes the onscreen content to jump down. I’m still working on a proper fix for this, as it is, I already prevent resizing cells if it is not yet visible, or already scrolled off screen.
I’ll see if I can’t come up with something to improve this soon.
And I don’t know if it’s useful but I often find the ‘jumping’ is pretty transient—it will happen once but then scrolling up and down over that section is smooth.
However I just found this post whose comments are full of images, and this one jumps pretty consistently for me—thought it may help as a test case if you didn’t already have one :)
https://feddit.uk/post/11886380