iamthevoid
11/09/2021, 1:38 PMModalBottomSheetLayout 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.iamthevoid
11/09/2021, 1:38 PMiamthevoid
11/09/2021, 1:39 PMiamthevoid
11/09/2021, 1:39 PMiamthevoid
11/09/2021, 1:40 PMcollect not calls (i see no logs)iamthevoid
11/09/2021, 1:41 PMiamthevoid
11/09/2021, 1:41 PMclass DogActionSheetCommand : ActionSheetCommand {
enum class Item {
EDIT,
CANCEL
}
override val items: List<String>
get() = Item.values().map { it.name }
}iamthevoid
11/09/2021, 1:41 PMuiManager.showActionSheet(DogActionSheetCommand())iamthevoid
11/09/2021, 1:42 PMshowActionSheet calls each time, i put log here and it print message each timeiamthevoid
11/09/2021, 1:42 PM