Skip to content

Instantly share code, notes, and snippets.

View danielloaizabr's full-sized avatar

Daniel Loaiza danielloaizabr

View GitHub Profile
@danielloaizabr
danielloaizabr / paging.kt
Created September 21, 2022 23:51
Paging Implementation
@Composable
fun AnalyzedCallsScreen(
viewModel: AnalyzedCallsViewModel = hiltViewModel()
) {
val calls = viewModel.data.collectAsLazyPagingItems()
val revealedCardIds by viewModel.revealedCardIdsList.collectAsState()
LazyColumn {
items(calls.itemCount) {
calls[it]?.let { item ->
when (item) {