diff --git a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsItem.kt b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsItem.kt index d39e61c83..0830bf036 100644 --- a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsItem.kt +++ b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsItem.kt @@ -90,17 +90,17 @@ fun InterestsItem( modifier = modifier .semantics(mergeDescendants = true) { /* no-op */ } .selectable(selected = isSelected, onClick = onClick) - .run { + .then( if (isSelected) { - border( + Modifier.border( width = 1.dp, color = MaterialTheme.colorScheme.outline, shape = MaterialTheme.shapes.medium, ) } else { - this + Modifier } - }, + ), ) } diff --git a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsRoute.kt b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsRoute.kt index a48d1c2f7..dc6a087a0 100644 --- a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsRoute.kt +++ b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsRoute.kt @@ -74,13 +74,13 @@ internal fun InterestsRoute( modifier = Modifier .fillMaxHeight() .weight(1f) - .run { - if (!shouldShowTwoPane) { - safeDrawingPadding() + .then( + if (shouldShowTwoPane) { + Modifier } else { - this + Modifier.safeDrawingPadding() } - }, + ), ) { topicUiState?.let { state -> TopicScreen(