Pablo Distéfano
05/14/2024, 7:25 PMPablo Distéfano
05/14/2024, 7:25 PMNavHost
with two composables A, B. When I remove the side panel with a plain if, the viewModel of the active side panel never calls onCleared()
and it is kept alive. I noticed the viewModels are cleared successfully when switching between A and B but not when removing the NavHost
. Is there a way to clear them properly?Stylianos Gakis
05/14/2024, 7:54 PMPablo Distéfano
05/14/2024, 8:53 PMPablo Distéfano
05/14/2024, 8:57 PMPablo Distéfano
05/14/2024, 9:01 PMStylianos Gakis
05/15/2024, 5:18 AMPablo Distéfano
05/15/2024, 4:24 PM