Last active
August 16, 2018 02:24
-
-
Save paulocns/e84b5232ffdd6fd3b3de3b846bcf490f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SearchShows @Inject | |
constructor(private val showRepository: ShowRepository, private val resourceRepository: ResourceRepository) : | |
UseCase<Show>() { | |
var id: String? = null | |
override suspend fun executeOnBackground(): Show { | |
id?.let { | |
val showDetail = background{ | |
showRepository.showDetail(it) | |
} | |
val showBanner = background{ | |
showRepository.showBanner(it) | |
} | |
return Show(showDetail.await(), showBanner.await()) | |
} | |
return Show() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment