Skip to content

Instantly share code, notes, and snippets.

@enginebai
Last active September 13, 2020 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enginebai/7498823aecfe38b582d532ccee59cd72 to your computer and use it in GitHub Desktop.
Save enginebai/7498823aecfe38b582d532ccee59cd72 to your computer and use it in GitHub Desktop.
MovieHunt blog part3.
data class Listing<T>(
// the paged list for UI to observer
val pagedList: Observable<PagedList<T>>,
// the network request status for pull-to-refresh or first time refresh
val refreshState: Observable<NetworkState>? = null,
// the network request state to show load more progress or error
val loadMoreState: Observable<NetworkState>? = null,
// refresh the whole data set and fetch it from scratch
val refresh: () -> Unit = {}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment