lewis
02/02/2021, 4:42 PMval lazyItems = posts.collectAsLazyPagingItems()
if(lazyItems.itemCount == 0) {
NoItemsLeft()
} else {
LazyColumn(modifier = modifier) {
items(lazyItems) {
lewis
02/02/2021, 4:52 PMLazyColumn
instead.Johan Reitan
02/02/2021, 6:24 PMlazyItems.loadState.refresh is LoadState.NotLoading && lazyItems.loadState.refresh.endOfPaginationReached && lazyItems.itemCount == 0
I would have thought that this was a common use case that would have have some kind of API, but I couldn't find it.lewis
02/03/2021, 7:49 AMLoadState
but didn't think to use NotLoading
!