Skip to content

Commit

Permalink
Fix start padding of org unit item
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Agarwal committed May 30, 2024
1 parent 96c45c8 commit f0de9c3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ private fun OrgTreeList(
items(orgTreeItems) { item ->
OrgUnitSelectorItem(
orgTreeItem = item,
higherLevel = orgTreeItems.minBy { it.level }.level,
searchQuery = searchQuery,
onItemClick = onItemClick,
onItemSelected = onItemSelected,
Expand All @@ -207,6 +208,7 @@ private fun OrgTreeList(
@Composable
fun OrgUnitSelectorItem(
orgTreeItem: OrgTreeItem,
higherLevel: Int,
searchQuery: String,
modifier: Modifier = Modifier,
onItemClick: (uid: String) -> Unit,
Expand All @@ -226,7 +228,7 @@ fun OrgUnitSelectorItem(
) {
onItemClick(orgTreeItem.uid)
}
.padding(start = ((orgTreeItem.level * 2) * 16).dp),
.padding(start = ((orgTreeItem.level - higherLevel) * 16).dp),
verticalAlignment = Alignment.CenterVertically,
) {
val icon = orgTreeItemIcon(orgTreeItem)
Expand Down

0 comments on commit f0de9c3

Please sign in to comment.