Skip to content

Instantly share code, notes, and snippets.

@lukaszkalnik
Last active June 19, 2020 07:46
Show Gist options
  • Save lukaszkalnik/80b0d22cde710bbc1a6f8f39b34d9f02 to your computer and use it in GitHub Desktop.
Save lukaszkalnik/80b0d22cde710bbc1a6f8f39b34d9f02 to your computer and use it in GitHub Desktop.
coroutineScope.launch {
tmdbApi.getConfiguration().fold(
ifLeft = { apiError -> showError(apiError) },
ifRight = { configuration -> saveConfiguration(configuration) }
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment