From 60a6fb1a3e74249be2917f349431cbbcffacbd56 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Mon, 4 Apr 2022 21:00:17 +0200 Subject: [PATCH] Fixed file name not being completly displayed when it's in the root of the dir for commited changes --- src/main/kotlin/app/ui/CommitChanges.kt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/app/ui/CommitChanges.kt b/src/main/kotlin/app/ui/CommitChanges.kt index eef6180..9707cad 100644 --- a/src/main/kotlin/app/ui/CommitChanges.kt +++ b/src/main/kotlin/app/ui/CommitChanges.kt @@ -227,15 +227,17 @@ fun CommitLogChanges( tint = diffEntry.iconColor, ) - Text( - text = diffEntry.parentDirectoryPath, - modifier = Modifier.weight(1f, fill = false), - maxLines = 1, - softWrap = false, - fontSize = 13.sp, - overflow = TextOverflow.Ellipsis, - color = secondaryTextColor, - ) + if(diffEntry.parentDirectoryPath.isNotEmpty()) { + Text( + text = diffEntry.parentDirectoryPath, + modifier = Modifier.weight(1f, fill = false), + maxLines = 1, + softWrap = false, + fontSize = 13.sp, + overflow = TextOverflow.Ellipsis, + color = secondaryTextColor, + ) + } Text( text = diffEntry.fileName, modifier = Modifier.weight(1f, fill = false),