Skip to content

Instantly share code, notes, and snippets.

@Sottti
Created November 2, 2025 09:48
Show Gist options
  • Save Sottti/dad5dba5f8bdc6d36de9ae38000e4f9e to your computer and use it in GitHub Desktop.
Save Sottti/dad5dba5f8bdc6d36de9ae38000e4f9e to your computer and use it in GitHub Desktop.
val isInitialLoad = items.loadState.refresh is Loading && items.itemCount == 0
val isError = items.loadState.refresh is Error && items.itemCount == 0
val isListEmpty = items.loadState.refresh is NotLoading &&
items.loadState.append.endOfPaginationReached &&
items.itemCount == 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment