/ before file is always shown even if the path is being cut

This commit is contained in:
Abdelilah El Aissaoui 2022-10-27 20:20:39 +02:00
parent 315387fafc
commit c4ce272359
3 changed files with 30 additions and 3 deletions

View File

@ -280,7 +280,7 @@ fun CommitLogChanges(
if (diffEntry.parentDirectoryPath.isNotEmpty()) {
Text(
text = diffEntry.parentDirectoryPath,
text = diffEntry.parentDirectoryPath.removeSuffix("/"),
modifier = Modifier.weight(1f, fill = false),
maxLines = 1,
softWrap = false,
@ -288,6 +288,15 @@ fun CommitLogChanges(
style = MaterialTheme.typography.body2,
color = MaterialTheme.colors.onBackgroundSecondary,
)
Text(
text = "/",
maxLines = 1,
softWrap = false,
style = MaterialTheme.typography.body2,
overflow = TextOverflow.Visible,
color = MaterialTheme.colors.onBackgroundSecondary,
)
}
Text(
text = diffEntry.fileName,

View File

@ -605,7 +605,7 @@ private fun FileEntry(
if (statusEntry.parentDirectoryPath.isNotEmpty()) {
Text(
text = statusEntry.parentDirectoryPath,
text = statusEntry.parentDirectoryPath.removeSuffix("/"),
modifier = Modifier.weight(1f, fill = false),
maxLines = 1,
softWrap = false,
@ -613,6 +613,15 @@ private fun FileEntry(
overflow = TextOverflow.Ellipsis,
color = MaterialTheme.colors.onBackgroundSecondary,
)
Text(
text = "/",
maxLines = 1,
softWrap = false,
style = MaterialTheme.typography.body2,
overflow = TextOverflow.Visible,
color = MaterialTheme.colors.onBackgroundSecondary,
)
}
Text(
text = statusEntry.fileName,

View File

@ -631,7 +631,7 @@ private fun DiffHeader(
Row(Modifier.weight(1f, true)) {
if (dirPath.isNotEmpty()) {
Text(
text = dirPath,
text = dirPath.removeSuffix("/"),
style = MaterialTheme.typography.body2,
color = MaterialTheme.colors.onBackgroundSecondary,
maxLines = 1,
@ -642,6 +642,15 @@ private fun DiffHeader(
.weight(1f, false)
.padding(start = 16.dp),
)
Text(
text = "/",
maxLines = 1,
softWrap = false,
style = MaterialTheme.typography.body2,
overflow = TextOverflow.Visible,
color = MaterialTheme.colors.onBackgroundSecondary,
)
}
Text(
text = fileName,