gh123man / SwiftUI-Refresher

A native, customizable SwiftUI refresh control
MIT License
119 stars 12 forks source link

Scroll to top after completing refresh, to avoid some cases when content is stuck #5

Closed mbarashkov closed 9 months ago

mbarashkov commented 1 year ago

In some cases the content is stuck after refreshing (I don't really understand why). To add a safeguard I scroll the content scrollView to zero after completing refresh.

gh123man commented 1 year ago

Thanks for the PR. What iOS version/device were you able to repro the stuck content on? I'll try to reproduce - but even if I can't, this seems like a safe change.

mbarashkov commented 1 year ago

I can't exactly say how to easily reproduce this. After SOME changes in the layout it became very easy to pull a scrollview, and it was stuck there even after refresh was compelted. One small drag and it's back. BTW I've added another commit to take headerInset into account (scrolling to .zero is wrong in my case).

gh123man commented 1 year ago

out Unfortunately this change has some side effects. If you scroll down while the refresher is spinning, this code will force scroll to the top when it's done which is undesirable.

Also it appears to conflict strangely with searchable

gh123man commented 9 months ago

Closing due to lack of activity. Thanks!