Lilly
02/20/2021, 4:33 PMDecompose
in one of his recent blog posts. I was interested in decompose and had a look into this example but I can't figure out how it's restoring the scroll position of the LazyColumn
when moving from the details screen back to the list screen. I'm looking for hours but I can't find the responsible piece of code. Can some please have a look and give me a hint?
https://github.com/arkivanov/ComposeNavigatorExampleArkadii Ivanov
02/20/2021, 6:13 PMChildren
function (https://github.com/arkivanov/ComposeNavigatorExample/blob/655bdef8667960c82ba88c628b0bb9ba8443bdeb/navigator/src/commonMain/kotlin/com/arkivanov/composenavigatorexample/navigator/Navigator.kt#L72).Lilly
02/20/2021, 6:37 PMconfiguration
which gets stored and restored but configuration
is just the representation of the screen state. I do the same in my code but this doesn't restore the scroll position. Can you elaborate this pleaseArkadii Ivanov
02/20/2021, 6:42 PMLilly
02/20/2021, 6:55 PMArkadii Ivanov
02/20/2021, 7:02 PMSaveabaleStateHolder
stores saved UI state per key (per configuration). SaveableStateProvider
sets the corresponding Ambient (now Local) for currently active screen. So sub-components can use UiSavedStateRegistry
, which actually LazyColumn
does.Andrey Kulikov
02/20/2021, 9:12 PMLilly
02/21/2021, 1:41 AM