Trackers empty scores start starts from middle (#9624)

* Trackers empty scores start starts from middle

* Trackers empty scores start starts from middle

* Trackers empty scores start starts from middle
This commit is contained in:
Semen 2023-06-24 17:37:20 +03:00 committed by GitHub
parent f2b0d74b4c
commit 2eca8511cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,7 @@ fun TrackScoreSelector(
content = { content = {
WheelTextPicker( WheelTextPicker(
modifier = Modifier.align(Alignment.Center), modifier = Modifier.align(Alignment.Center),
startIndex = selections.indexOf(selection).coerceAtLeast(0), startIndex = selections.indexOf(selection).takeIf { it > 0 } ?: (selections.size / 2),
items = selections, items = selections,
onSelectionChanged = { onSelectionChange(selections[it]) }, onSelectionChanged = { onSelectionChange(selections[it]) },
) )