diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt b/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt index a8257f8..8165701 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt @@ -42,10 +42,10 @@ fun Modifier.handOnHover(): Modifier { // TODO Try to restore hover that was shown with clickable modifier @OptIn(ExperimentalComposeUiApi::class) @Composable -fun Modifier.fastClickable(key: Any = Unit, onClick: () -> Unit) = +fun Modifier.fastClickable(key: Any = Unit, key2: Any = Unit, onClick: () -> Unit) = this.handOnHover() .hoverBackground() - .pointerInput(key) { + .pointerInput(key, key2) { while (true) { val lastMouseEvent = awaitPointerEventScope { awaitFirstDownEvent() } val mouseEvent = lastMouseEvent.awtEventOrNull diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/log/Log.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/log/Log.kt index d23b924..baeb764 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/log/Log.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/log/Log.kt @@ -751,7 +751,7 @@ fun CommitLine( ) { Box( modifier = Modifier - .fastClickable(graphNode) { onRevCommitSelected() } + .fastClickable(graphNode, logViewModel) { onRevCommitSelected() } .padding(start = graphWidth) .height(LINE_HEIGHT.dp) .backgroundIf(isSelected, MaterialTheme.colors.backgroundSelected)