Skip to content

Commit

Permalink
[#599] Review: Apply the rule which says that mandatory parameters mu…
Browse files Browse the repository at this point in the history
…st be before optional parameters in a function signature
  • Loading branch information
paulinea committed Sep 5, 2023
1 parent 76255f9 commit a90978f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ fun OdsIconToggleButtonsRow(
)
) {
icons.forEachIndexed { index, icon ->
icon.Content(index = index, displaySurface = displaySurface, selected = selectedIndex == index) { clickedButtonIndex ->
icon.Content(index = index, displaySurface = displaySurface, selected = selectedIndex == index, onClick = { clickedButtonIndex ->
onSelectedIndexChange(clickedButtonIndex)
}
})
if (index < icons.size) {
Divider(
modifier = Modifier
Expand Down Expand Up @@ -137,11 +137,11 @@ class OdsIconToggleButtonsRowIcon : OdsComponentIcon {
}

@Composable
internal fun Content(index: Int, displaySurface: OdsDisplaySurface = OdsDisplaySurface.Default, selected: Boolean = false, onClick: (Int) -> Unit) {
internal fun Content(index: Int, onClick: (Int) -> Unit, displaySurface: OdsDisplaySurface = OdsDisplaySurface.Default, selected: Boolean = false) {
this.index = index
this.onClick = onClick
this.displaySurface = displaySurface
this.selected = selected
this.onClick = onClick
Content()
}

Expand Down

0 comments on commit a90978f

Please sign in to comment.