# compose

Travis Griggs

10/12/2023, 6:23 PM
Is there a way to "cancel" detectDragGesturesAfterLongPress() pointerInput in the onDragStart closure? I guess I can set some remembered state which I use to conditionally test in the other closures (e.g. var isDragRealAndActive by remember { mutableStateOf(false) }). But I was wondering if there's a more general mechanism for cancelling the current operation and wait for the new gesture

Zach Klippenstein (he/him) [MOD]

10/13/2023, 1:00 PM
One way is changing the key passed to the input modifier
You might also be able to create a child coroutine job inside the modifier and cancel that, but input coroutines are weird and I’m not sure that would work