this post was submitted on 18 Apr 2024
9 points (100.0% liked)
Arctic
330 readers
2 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 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 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
I think I saw a note in the last change log about this—apologies if I mis-remembered. Just wanted to say I think it’s still happening, and I just saw what I think is the clearest example.
I’d scrolled to a point where the top few pixels, perhaps the top line of text, was visible on a post at the bottom of the screen. That post contained a link, and as I was looking at the post above the whole feed jumped ‘up’ and the barely visible bottom post was in the view. I guess this fits with what you’d said about that post changing size when its content became available after previous the link.
Hopefully you can find a way for the top of that post on screen to be anchored so the feed moves ‘down’ instead of ‘up’… :)