Fixed double click lambda not being refreshed after changing tabs
The issue would be specially present when clicking on the side panel and changing tabs, if the user tried to change a branch, it would be changed in the repository of the previous.
This commit is contained in:
parent
e5a84705e9
commit
dc5efb25aa
@ -66,7 +66,7 @@ fun Modifier.handOnHover(): Modifier {
|
|||||||
fun Modifier.onDoubleClick(
|
fun Modifier.onDoubleClick(
|
||||||
onDoubleClick: () -> Unit,
|
onDoubleClick: () -> Unit,
|
||||||
): Modifier {
|
): Modifier {
|
||||||
return this.pointerInput(Unit) {
|
return this.pointerInput(onDoubleClick) {
|
||||||
coroutineScope {
|
coroutineScope {
|
||||||
awaitEachGesture {
|
awaitEachGesture {
|
||||||
// Detect first click without consuming it (other, independent handlers want it).
|
// Detect first click without consuming it (other, independent handlers want it).
|
||||||
@ -83,7 +83,9 @@ fun Modifier.onDoubleClick(
|
|||||||
} while (change.uptimeMillis < minUptime)
|
} while (change.uptimeMillis < minUptime)
|
||||||
change
|
change
|
||||||
} ?: return@awaitEachGesture
|
} ?: return@awaitEachGesture
|
||||||
|
|
||||||
secondDown.consume()
|
secondDown.consume()
|
||||||
|
|
||||||
val secondUp = waitForUpOrCancellation() ?: return@awaitEachGesture
|
val secondUp = waitForUpOrCancellation() ?: return@awaitEachGesture
|
||||||
secondUp.consume()
|
secondUp.consume()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user