Skip to content

Commit

Permalink
refactor: Remove unused modifier parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dcalhoun committed Nov 15, 2024
1 parent 05e0079 commit 987fee7
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class ExperimentalFeaturesActivity : AppCompatActivity() {
@Composable
fun ExperimentalFeaturesScreen(
features: Map<String, Feature>,
modifier: Modifier = Modifier,
onFeatureToggled: (key: String, label: String, enabled: Boolean) -> Unit,
onNavigateBack: () -> Unit
) {
Expand All @@ -118,15 +117,14 @@ fun ExperimentalFeaturesScreen(
)
},
) { innerPadding ->
Box(modifier = modifier.then(Modifier.padding(innerPadding))) {
Box(modifier = Modifier.padding(innerPadding)) {
Column {
features.forEach { (key, feature) ->
FeatureToggle(
key = key,
label = feature.label,
enabled = feature.enabled,
onChange = onFeatureToggled,
modifier = modifier
)
}
}
Expand All @@ -136,15 +134,14 @@ fun ExperimentalFeaturesScreen(

@Composable
fun FeatureToggle(
modifier: Modifier = Modifier,
key: String,
label: String,
enabled: Boolean,
onChange: (String, String, Boolean) -> Unit,
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
modifier = Modifier
.clickable { onChange(key, label, !enabled) }
.padding(horizontal = Margin.ExtraLarge.value, vertical = Margin.MediumLarge.value)
) {
Expand Down

0 comments on commit 987fee7

Please sign in to comment.