Open tomczyn opened 6 months ago
It appears that rememberNavigator
consistently returns the same Navigator
. One possible workaround is to assign a unique name each time rememberNavigator
is used.
Perhaps we should consider automatically assigning different names when using rememberNavigator
Thank you, that works! The most important thing is it can be very easily solved, but good point on the behavior change.
Describe the bug When nesting a
NavHost
inside aModalBottomSheet
content, it shows visual glitches instead of a correctComposables
. By glitches I mean nestedNavHost
(bottom sheet content) is being displayed on the sheet and underneath the sheet,Compose
is copying the content to two places and not displaying the originalNavHost
at all.What it should show, blue is a main view (whole screen home
NavHost
), red is bottom sheet content (150.dp
height).What is shown, bottom sheet content displayed on the sheet and underneath it.
Minimal reproducible example
Repo: https://github.com/tomczyn/PreCompose-Sample Branch with
StateHolder
fix: https://github.com/tomczyn/PreCompose-Sample/tree/fixWorkaround
It appears that wrapping the
NavHost
inStateHolder
solves the problem with displaying the content, but the behavior of the bottom sheet is still a little bit bugged with this workaround. Instead, it sometimes doesn't show the showing/hidding animation of the bottom sheet correctly.