I have horizontal scroll view inside horizontal sc...
# compose
i
I have horizontal scroll view inside horizontal scroll pager. I want to pager not to scroll if i scroll inner scroll view. What the best way to make that?
For now i found good way, but it not working everytime. i remember scroll state for inner scrollable
Copy code
val scrollState = rememberScrollState()
I dispatch result to pager
Copy code
@Composable
private fun AdditionalRow(broker: Broker, onInnerScroll: (scrolling: Boolean) -> Unit) {
    val scrollState = rememberScrollState()
    val scrolling by remember { derivedStateOf { scrollState.isScrollInProgress } }
    LaunchedEffect(scrolling) {
        onInnerScroll(scrolling)
    }
...........................
And for pager i use resulting value
Copy code
var pagerCanScroll by remember { mutableStateOf(true) }

    Column {
        HorizontalPager(
            userScrollEnabled = pagerCanScroll,
            ......
            {
                Item(
                    onInnerScroll = { pagerCanScroll = !it }
.......................
The problem is: When i scroll slowly - it works, when i scroll fast pager scrolls as inner view scrolls
As i understand launched effect is coroutine and run asynchronously and result does not dispatch immidiately to pager
The structure is
Copy code
HorizontalPager {
    LazyColumn {
        item {
            ....
            HorizontalScrollable()
I could hoist scroll state of inner horizontal scrollable view, but i can not, because i have many horizontal scrollables, not one