Skip to content

Instantly share code, notes, and snippets.

@HarryTylenol
Created August 5, 2019 14:17
Show Gist options
  • Save HarryTylenol/eeaafc2a1710e297b3e9e6ead667abf6 to your computer and use it in GitHub Desktop.
Save HarryTylenol/eeaafc2a1710e297b3e9e6ead667abf6 to your computer and use it in GitHub Desktop.
0003_5
private val festivalRequest = MutableLiveData<An>()
private val festivalResponse = festivalRequest.map { getFestivalUseCase.execute(it) }
val festival = festivalResponse.switchMap { it.data }
val festivalState = festivalResponse.switchMap { it.state }
val festivalRefreshState = festivalResponse.switchMap { it.refreshState }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment