hey guys looks like drawer gesture doesn't work wh...
# compose
d
hey guys looks like drawer gesture doesn't work when using horizontal pager inside scaffold. is there any workaround? maybe we can temporarily disable the pager gestures like we did with views in precompose era?
i created this modifier for the pager:
Copy code
fun Modifier.edgeBypass(scrollEnabled: MutableState<Boolean>): Modifier = then(Modifier.pointerInput(scrollEnabled) {
    val drawerTapArea = 48.dp.toPx()
    forEachGesture {
        awaitPointerEventScope {
            val down = awaitFirstDown(false)
            scrollEnabled.value = down.position.x >= drawerTapArea
            val up = waitForUpOrCancellation()
            scrollEnabled.value = true
        }
    }
})
it modifies the boolean state when user taps on left edge. then i pass this state to the pager's
userScrollEnabled
. maybe a bit ugly but it works as expected.