Skk-tj / HoloCal

The repository for iOS App - HoloCal
2 stars 2 forks source link

Scrolling can be stuttery #28

Closed heygarrett closed 1 year ago

heygarrett commented 2 years ago

Describe the bug Scrolling up through the Upcoming list can cause the view to stutter instead of scrolling smoothly.

To Reproduce

Expected behavior Smooth scrolling on the way back up

Screenshots https://user-images.githubusercontent.com/1154912/203905173-127d4cf0-2d0d-4ec7-9c53-b8da407d98fd.MOV

Smartphone (please complete the following information):

Skk-tj commented 2 years ago

I'll attempt to fix this in the next release. This one is unfortunate due to how SwiftUI handles AsyncImage inside a List (which is lazy). Meanwhile, please feel free to join the Testflight (available in the app) so you would have an opportunity to preview the changes.

heygarrett commented 2 years ago

Do the images get cached or are they fetched every time they come into view? I remember running into a similar problem during a brief foray into app development years ago, but I think that was before the introduction of SwiftUI. I have no idea how that would work now. 😅

Skk-tj commented 1 year ago

Pretty sure they don't do that. What I believe Apple does is if that image is out of your viewable space, then it gets "unmounted" from the UI. So I believe what happened is when you scroll really quickly, the UI can't react fast enough to remount the image back to the UI.

Skk-tj commented 1 year ago

I think I have found a fix. Coming in the next release. Might take some time given that the next release is rather huge