Marcin Wisniowski
03/08/2025, 5:34 PMModifier.onClick(onClick = {}, onDoubleClick = {})
works, but the problem is the click events are delayed. It seems the Modifier waits to see if it's a double click before deciding it's a single click and firing that event. Is there an existing way to avoid this delay? I am fine with receiving both the click and then double click events when the element is double clicked.
I can of course implement the double click detection myself, but I am wondering if I am missing something existing.Marcin Wisniowski
03/08/2025, 5:51 PM.pointerInput(Unit) {
detectTapGestures(
onPress = { },
onDoubleTap = { }
)
}
This seems to have the behavior I want. The onPress
is delivered on button down, not button up like normal clicks, but in my use case it's actually desirable.