Repository: android/compose-samples
File: Jetcaster/wear/src/main/java/com/example/jetcaster/ui/library/PodcastsScreen.kt (Kotlin)

Code before:
                        )
                    }
                }
            }
        }
    }
}

@ExperimentalHorologistApi
@Composable
fun PodcastsScreen(
    podcastsScreenState: PodcastsScreenState<PodcastInfo>,
    onPodcastsItemClick: (PodcastInfo) -> Unit,
    modifier: Modifier = Modifier,
    podcastItemArtworkPlaceholder: Painter? = null,
) {

    val podcastContent: @Composable (podcast: PodcastInfo) -> Unit = { podcast ->
        Chip(
            label = podcast.title,
            onClick = { onPodcastsItemClick(podcast) },
            icon = CoilPaintable(podcast.imageUrl, podcastItemArtworkPlaceholder),
            largeIcon = true,
            colors = ChipDefaults.secondaryChipColors(),
        )
    }

    PodcastsScreen(
        podcastsScreenState = podcastsScreenState,
        podcastContent = podcastContent,
        modifier = modifier,
    )
}

@ExperimentalHorologistApi
@Composable
fun <T> PodcastsScreen(
    podcastsScreenState: PodcastsScreenState<T>,
    podcastContent: @Composable (podcast: T) -> Unit,
    modifier: Modifier = Modifier,
) {
    val columnState = rememberColumnState()
    ScreenScaffold(scrollState = columnState) {
        SectionedList(
            modifier = modifier,
            columnState = columnState,
        ) {
            val sectionState = when (podcastsScreenState) {
                is PodcastsScreenState.Loaded<T> -> {
                    Section.State.Loaded(podcastsScreenState.podcastList)
                }

Review comment (suggestion):
Use trailing lambda syntax for providing `podcastContent`

Code after:
                }
            }
        }
    }
}

@ExperimentalHorologistApi
@Composable
fun PodcastsScreen(
    podcastsScreenState: PodcastsScreenState<PodcastInfo>,
    onPodcastsItemClick: (PodcastInfo) -> Unit,
    modifier: Modifier = Modifier,
    podcastItemArtworkPlaceholder: Painter? = null,
) {

    val podcastContent: @Composable (podcast: PodcastInfo) -> Unit = { podcast ->
        Chip(
            label = podcast.title,
            onClick = { onPodcastsItemClick(podcast) },
            icon = CoilPaintable(podcast.imageUrl, podcastItemArtworkPlaceholder),
            largeIcon = true,
            colors = ChipDefaults.secondaryChipColors(),
        )
    }

    PodcastsScreen(
        podcastsScreenState = podcastsScreenState,
        modifier = modifier,
        content = { podcast ->
            Chip(
                label = podcast.title,
                onClick = { onPodcastsItemClick(podcast) },
                icon = CoilPaintable(podcast.imageUrl, podcastItemArtworkPlaceholder),
                largeIcon = true,
                colors = ChipDefaults.secondaryChipColors(),
            )
        }
    )
}

@ExperimentalHorologistApi
@Composable
fun <T> PodcastsScreen(
    podcastsScreenState: PodcastsScreenState<T>,
    modifier: Modifier = Modifier,
    content: @Composable (podcast: T) -> Unit,
) {
    val columnState = rememberColumnState()
    ScreenScaffold(scrollState = columnState) {
        SectionedList(
            modifier = modifier,