Removed use of keys in graph commits list
This commit is contained in:
parent
2e0e616dc2
commit
5d7d1d6f8b
1 changed files with 4 additions and 2 deletions
|
@ -382,7 +382,9 @@ fun MessagesList(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
items(items = commitList, key = { it.name }) { graphNode ->
|
// Setting a key makes the graph preserve the scroll position when a new line has been added on top (uncommited changes)
|
||||||
|
// Therefore, after popping a stash, the uncommited changes wouldn't be visible and requires the user scrolling.
|
||||||
|
items(items = commitList) { graphNode ->
|
||||||
CommitLine(
|
CommitLine(
|
||||||
graphWidth = graphWidth,
|
graphWidth = graphWidth,
|
||||||
logViewModel = logViewModel,
|
logViewModel = logViewModel,
|
||||||
|
@ -485,7 +487,7 @@ fun GraphList(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
items(items = commitList, key = { it.name }) { graphNode ->
|
items(items = commitList) { graphNode ->
|
||||||
val nodeColor = colors[graphNode.lane.position % colors.size]
|
val nodeColor = colors[graphNode.lane.position % colors.size]
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
|
|
Loading…
Reference in a new issue