YASAN
03/25/2022, 9:18 PMLazyColumn
using Paging3 (with its compose library). I now show the paginated list by converting the PagingData
into a LazyPagigItems
object. My issue is that I cannot find a way to show any state other than the success state like showing the loading indicator or showing an error when the loading of a page fails. I have done this outside Compose using RecyclerViews but I cant find anything useful for it in Compose.YASAN
03/25/2022, 9:20 PMmyanmarking
03/26/2022, 1:07 AMPatrick Kellison
03/26/2022, 2:58 PMloadState
with properties like append, prepend,
refresh
that can be observed to be in Loading, Error, Refreshing, etc.
Not sure on the syntax, replying here on mobile, but that's the gist of itYASAN
03/26/2022, 4:10 PMval prependLoading = trendingGifs.loadState.prepend == LoadState.Loading
val appendLoading = trendingGifs.loadState.append == LoadState.Loading
So if these == loading it means data is being loaded on that side? I have to just handle how to properly show it in the composables?YASAN
03/26/2022, 4:19 PMmyanmarking
03/26/2022, 4:30 PMYASAN
03/26/2022, 4:31 PMYASAN
03/26/2022, 4:31 PMYASAN
03/26/2022, 4:31 PM