Listing is a structure designed to manage a list stream.
data class Listing<T>(val pagedList: LiveData<PagedList<T>>,val networkState: LiveData<NetworkState>,val refresh: () -> Unit,val refreshState: LiveData<NetworkState>,val retry: () -> Unit)
It contains basically five elements:
networkState: A stream that notifies network state changes, such as when a new page started loading (so you can show a spinner in the UI).
refresh: A refresh function, to refresh all data.
refreshState: A stream that notifies the status of the refresh request.
retry: A retry function to execute if something fails.