Fixed line uncommited changes -> first commit not being drawn in the log

This commit is contained in:
Abdelilah El Aissaoui 2023-09-11 20:56:43 +02:00
parent 60e67d9683
commit 1eb1eac47d
No known key found for this signature in database
GPG Key ID: 7587FC860F594869

View File

@ -450,7 +450,6 @@ fun MessagesList(
.clickable { logViewModel.selectUncommitedChanges() }
) {
UncommitedChangesGraphNode(
hasPreviousCommits = commitList.isNotEmpty(),
isSelected = selectedItem is SelectedItem.UncommitedChanges,
modifier = Modifier.offset(-horizontalScrollState.value.dp)
)
@ -1035,7 +1034,6 @@ fun CommitNode(
@Composable
fun UncommitedChangesGraphNode(
modifier: Modifier = Modifier,
hasPreviousCommits: Boolean,
isSelected: Boolean,
) {
val density = LocalDensity.current.density
@ -1051,7 +1049,7 @@ fun UncommitedChangesGraphNode(
modifier = Modifier.fillMaxSize()
) {
clipRect {
if (hasPreviousCommits) drawLine(
drawLine(
color = colors[0],
start = Offset(laneWidthWithDensity, this.center.y),
end = Offset(laneWidthWithDensity, this.size.height),