Last active
August 30, 2022 08:27
-
-
Save Skyyo/591f9aaf6c8afd7c2de33ec4a84a0c44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun PodcastsScreen(viewModel: PodcastsViewModel) { | |
val podcasts by viewModel.podcasts.collectAsStateWithLifecycle() | |
LazyColumn { | |
itemsIndexed(podcasts, { _, item -> item.id }) { index, podcast -> | |
PodcastCard( | |
podcast = podcast, | |
onDownloadClick = { viewModel.onDownloadPodcastClicked(podcast.id, index) }) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment