lax icon indicating copy to clipboard operation
lax copied to clipboard

Scroll position resets when navigating back to previous route

Open jtormey opened this issue 1 year ago • 5 comments

Steps to recreate

  1. Have enough channels so that scrolling down is possible
  2. Scroll down and select a channel
  3. Navigate back, see scroll position snap to top when view re-mounts

Likely requires upstream changes in https://github.com/liveview-native/liveview-client-swiftui

cc @bcardarella

jtormey avatar Jul 23 '24 23:07 jtormey

@jtormey Carson and I were talking about this today, there is a possible solution for < iOS 18 but considering that iOS 18 will be out in early September and iOS adoption rate is usually very high we've decided to punt in favor of the iOS >= 18 implementation that will come in LVN v0.4.

I'd be open to debating the merits of this decisoin if someone can show good data on slower than accepted adoption rate or if there are good reasons why some apps or organizations cannot use iOS 18 when it is available.

bcardarella avatar Jul 23 '24 23:07 bcardarella

Sorry, didn't mean to close on your repo 😱

bcardarella avatar Jul 23 '24 23:07 bcardarella

This is the branch that enables it https://github.com/liveview-native/liveview-client-swiftui/pull/1389

bcardarella avatar Jul 23 '24 23:07 bcardarella

Thank you for the quick response! I'll close this once I update the app to iOS 18 and confirm the fix.

jtormey avatar Jul 23 '24 23:07 jtormey

Scroll restoration is implemented for all iOS versions support by LVN in this PR: https://github.com/liveview-native/liveview-client-swiftui/pull/1394

carson-katri avatar Jul 25 '24 20:07 carson-katri