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:
Abdelilah El Aissaoui 2024-09-10 18:57:37 +02:00
parent e5a84705e9
commit dc5efb25aa
No known key found for this signature in database
GPG Key ID: 7587FC860F594869

View File

@ -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()