Add key to the StatusEntries list

When clicking around a lot, staging and unstaging some files, it otherwise messed up the association of StatusEntry and file and then didn't do anything when I clicked a certain file, presumably because it thought it was already shown.
This commit is contained in:
Philipp Keck 2023-01-29 22:28:36 +01:00
parent 9d07ac59b7
commit 70a9331b7b

View File

@ -581,7 +581,7 @@ private fun EntriesList(
.background(MaterialTheme.colors.background),
state = lazyListState,
) {
items(statusEntries) { statusEntry ->
items(statusEntries, key = { it.filePath }) { statusEntry ->
val isEntrySelected = selectedEntryType != null &&
selectedEntryType is DiffEntryType.UncommitedDiff && // Added for smartcast
selectedEntryType.statusEntry == statusEntry