Jason Ankers
05/20/2021, 6:13 AMLazyColumn
scroll position will not be saved if both of these conditions are met:
• A screen with a LazyColumn
instantiates a ViewModel with hiltViewModel()
• An item in the LazyColumn
references an unstable object (i.e. a navController)
Is this expected?julioromano
05/20/2021, 6:22 AMThe new navigation state restoration changes are greatWhat exactly are you referring to by this?
Jason Ankers
05/20/2021, 6:23 AMjulioromano
05/20/2021, 6:48 AMjulioromano
05/20/2021, 6:50 AMJason Ankers
05/20/2021, 7:33 AMsaveState
and restoreState
properties on NavOptionsBuilder
When I set these properties to true while navigating between bottom tabs, I would expect scroll positions to persist across tab changes (which they do, unless the circumstances I described in the OP are met)julioromano
05/20/2021, 7:47 AMIan Lake
05/20/2021, 1:02 PMLazyColumn
in beta07: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1621443353261700?thread_ts=1621443353.261700&cid=CJLTWPH7SJason Ankers
05/20/2021, 4:09 PMIan Lake
05/20/2021, 4:10 PM