So I had to choose between a random crash on ScrollViewProxy scrollTo and a flash when adding a new posts on the top of the timeline... I choose the flash. This is a sad day for #SwiftUI
@dimillian I'm not sure why this fixes the crash? Any explanation to share? Thanks!
@alpennec the list view ld force the list to completely re render, and then once it’s rendered I’m scrolling to the original status. The crash seems like it was related to scrolling when the list was not ready. The opacity is just to hide the fact that in between it’s scrolled to the top.
@dimillian thanks for answering! Nice workaround.
@dimillian @alpennec wouldn’t it be better to ID the whole List (or, preferably, ForEach inside?)
@lvalenta @alpennec the id is on the whole list.
@dimillian @alpennec aha! And what about just ForEach?
@lvalenta @alpennec i wonder. It’s so hard to test that every change to test the crash is very time consuming :/
@dimillian @alpennec totally get it. Whenever you have time, try looking at it :-) I think the difference would be that scrolling position per se would not be destroyed in IDing ForEach
@alpennec for now I can’t reproduce but also it’s hard to reproduce, seems like it’s related to the amount of time the app is in background too.
@dimillian @alpennec Had been happening to me each morning for the past couple of days. Had to switch back to Mammoth for my first session of the day because of that. Flashing is not pretty, but it’s still better than a crash.
@slothdude @alpennec it’ll ship today so let me know how it goes. Same for me and it’s been ruining the fun of the app completely. So much that I thought about reverting everything and going back to the old behavior of manual tapping + scroll to top with new posts.
@dimillian I do find it somewhat amusing, though, that in the end your workaround does involve the async main call. I don’t remember how many issues I have had to fix with that piece of chewing gum.
@slothdude Fun fact is that with that alone it would change nothing. The real fix is in the id. Well I mean I guess it's both.