From 61d5ee941a7f78fde7fe8f562abe9c1c275072a1 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Mon, 4 Apr 2022 05:05:50 +0200 Subject: [PATCH] Fixed file name not being completly displayed when it's in the root of the dir --- src/main/kotlin/app/ui/UncommitedChanges.kt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/app/ui/UncommitedChanges.kt b/src/main/kotlin/app/ui/UncommitedChanges.kt index fd9d8aa..03ceab5 100644 --- a/src/main/kotlin/app/ui/UncommitedChanges.kt +++ b/src/main/kotlin/app/ui/UncommitedChanges.kt @@ -566,15 +566,17 @@ private fun FileEntry( tint = statusEntry.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),