mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 08:45:27 +02:00
Fixed wrong converted values after list changes
This commit is contained in:
parent
033e783e4c
commit
962471e776
@ -43,19 +43,19 @@ fun UnitsList(
|
|||||||
if (groupedUnits.isEmpty()) {
|
if (groupedUnits.isEmpty()) {
|
||||||
item { SearchPlaceholder() }
|
item { SearchPlaceholder() }
|
||||||
} else {
|
} else {
|
||||||
groupedUnits.forEach { (groupOfMeasurements, listOfMeasurements) ->
|
groupedUnits.forEach { (unitGroup, listOfUnits) ->
|
||||||
stickyHeader {
|
stickyHeader {
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(MaterialTheme.colorScheme.background)
|
.background(MaterialTheme.colorScheme.background)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 12.dp, horizontal = 8.dp),
|
.padding(vertical = 12.dp, horizontal = 8.dp),
|
||||||
text = stringResource(id = groupOfMeasurements.res),
|
text = stringResource(id = unitGroup.res),
|
||||||
style = MaterialTheme.typography.titleMedium,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = MaterialTheme.colorScheme.primary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
items(listOfMeasurements) { unit ->
|
items(items = listOfUnits, key = { it.unitId }) { unit ->
|
||||||
UnitListItem(
|
UnitListItem(
|
||||||
modifier = Modifier,
|
modifier = Modifier,
|
||||||
changeAction = changeAction,
|
changeAction = changeAction,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user