mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Fixed scroll to chip
Crashes when trying to scroll to hidden chip/group.
This commit is contained in:
parent
3ba2d1d5f6
commit
0fc7f289a6
@ -128,7 +128,11 @@ private fun BasicUnitListScreen(
|
|||||||
*/
|
*/
|
||||||
viewModel.setSelectedChip(currentUnit.group)
|
viewModel.setSelectedChip(currentUnit.group)
|
||||||
viewModel.loadUnitsToShow(noBrokenCurrencies)
|
viewModel.loadUnitsToShow(noBrokenCurrencies)
|
||||||
chipsRowLazyListState.animateScrollToItem(uiState.shownUnitGroups.indexOf(currentUnit.group))
|
|
||||||
|
val groupToSelect = uiState.shownUnitGroups.indexOf(currentUnit.group)
|
||||||
|
if (groupToSelect > -1) {
|
||||||
|
chipsRowLazyListState.animateScrollToItem(groupToSelect)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user