I want to show `ModalBottomSheetLayout` on user ac...
# compose
i
I want to show 
ModalBottomSheetLayout
 on user action. I have a component in app, that called 
ActionSheet
 and wrap 
ModalBottomSheetLayout
. It pass 
ModalBottomSheetState
 from outside by composable function params, other params for 
ModalBottomSheetLayout
 assigns under the hood [thread]. Also there is 
MutableStateFlow
 [somewhere in app, doesnt matter], that typed with 
ActionSheetCommand
 type. When user do the action then concrete implementation of 
ActionSheetCommand
 emits through the `MutableStateFlow`[thread]. 
ActionSheetWrapper
 [thread] - another wrapper around 
ActionSheet
, collect these emits and show `ActionSheet`(
ModalBottomSheetLayout
) using state, that initialized in 
ActionSheetWrapper
. Somewhy 
ModalBottomSheetLayout
 opens only on first emit. All next emits even not printed inside
emit
function of collector. Why can it be? Looks like
emit
function in collector somehow deadlock queue and next emits just not pass through
MutableStateFlow
.
I see bottom sheet only once, then lambda in
collect
not calls (i see no logs)
I emit different objects (equals == false), each time create new class instance
Copy code
class DogActionSheetCommand : ActionSheetCommand {

    enum class Item {
        EDIT,
        CANCEL
    }

    override val items: List<String>
        get() = Item.values().map { it.name }
}
Copy code
uiManager.showActionSheet(DogActionSheetCommand())
Function
showActionSheet
calls each time, i put log here and it print message each time
So problem is deadlock by some reason in collector