From 4bda2eb6811a6a87112bbd25e1124f857abce453 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Sat, 11 Jun 2022 13:48:53 +0200 Subject: [PATCH] Fixed click not working for non-local branches items on side panel Regression of change https://github.com/JetpackDuba/Gitnuro/pull/11 --- src/main/kotlin/app/ui/components/SideMenuSubentry.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/app/ui/components/SideMenuSubentry.kt b/src/main/kotlin/app/ui/components/SideMenuSubentry.kt index e0f459b..e0827bf 100644 --- a/src/main/kotlin/app/ui/components/SideMenuSubentry.kt +++ b/src/main/kotlin/app/ui/components/SideMenuSubentry.kt @@ -28,7 +28,7 @@ fun SideMenuSubentry( iconResourcePath: String, bold: Boolean = false, extraPadding: Dp = 0.dp, - onClick: (() -> Unit)? = null, + onClick: () -> Unit = {}, onDoubleClick: (() -> Unit)? = null, additionalInfo: @Composable () -> Unit = {} ) { @@ -36,12 +36,7 @@ fun SideMenuSubentry( modifier = Modifier .height(ENTRY_HEIGHT.dp) .fillMaxWidth() - .run { - if (onClick != null && onDoubleClick != null) - combinedClickable(onClick = onClick, onDoubleClick = onDoubleClick) - else - this - } + .combinedClickable(onClick = onClick, onDoubleClick = onDoubleClick) .padding(start = extraPadding), verticalAlignment = Alignment.CenterVertically, ) {