Fixed click not working for non-local branches items on side panel

Regression of change https://github.com/JetpackDuba/Gitnuro/pull/11
This commit is contained in:
Abdelilah El Aissaoui 2022-06-11 13:48:53 +02:00
parent 21c6f98bb3
commit 4bda2eb681

View file

@ -28,7 +28,7 @@ fun SideMenuSubentry(
iconResourcePath: String, iconResourcePath: String,
bold: Boolean = false, bold: Boolean = false,
extraPadding: Dp = 0.dp, extraPadding: Dp = 0.dp,
onClick: (() -> Unit)? = null, onClick: () -> Unit = {},
onDoubleClick: (() -> Unit)? = null, onDoubleClick: (() -> Unit)? = null,
additionalInfo: @Composable () -> Unit = {} additionalInfo: @Composable () -> Unit = {}
) { ) {
@ -36,12 +36,7 @@ fun SideMenuSubentry(
modifier = Modifier modifier = Modifier
.height(ENTRY_HEIGHT.dp) .height(ENTRY_HEIGHT.dp)
.fillMaxWidth() .fillMaxWidth()
.run { .combinedClickable(onClick = onClick, onDoubleClick = onDoubleClick)
if (onClick != null && onDoubleClick != null)
combinedClickable(onClick = onClick, onDoubleClick = onDoubleClick)
else
this
}
.padding(start = extraPadding), .padding(start = extraPadding),
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {