Open alexjpwalker opened 2 years ago
https://github.com/vaticle/typedb-studio/blob/master/view/graph/GraphArea.kt#L305
Fairly certain tryAwaitRelease() on this line is causing this.
Nevermind, passing a onDoubleTap
lambda argument to detectTapGestures
causes it to awaitSecondDown()
:
private suspend fun AwaitPointerEventScope.awaitSecondDown(
firstUp: PointerInputChange
): PointerInputChange? = withTimeoutOrNull(viewConfiguration.doubleTapTimeoutMillis) {
val minUptime = firstUp.uptimeMillis + viewConfiguration.doubleTapMinTimeMillis
var change: PointerInputChange
// The second tap doesn't count if it happens before DoubleTapMinTime of the first tap
do {
change = awaitFirstDown()
} while (change.uptimeMillis < minUptime)
change
}
meaning we're waiting until it is certainly not a double tap until registering it as a single tap.
We might want to move the double tap explain behaviour out of this entirely, or to find a way of lowering the times associated with waiting for a double tap.
Problem to Solve
It can take up to half a second for a clicked vertex to receive focus.
Proposed Solution
I wonder if Compose's
pointerInput.onTap
is laggy? But this worked fine in 2.4.0...