Skip to content

Instantly share code, notes, and snippets.

@anibalbastiass
Created January 3, 2020 19:07
Show Gist options
  • Save anibalbastiass/dfbb16e57139162507d4a2ddeda2c759 to your computer and use it in GitHub Desktop.
Save anibalbastiass/dfbb16e57139162507d4a2ddeda2c759 to your computer and use it in GitHub Desktop.
GetLatestCurrenciesUseCase.kt
open class GetLatestCurrenciesUseCase @Inject constructor(private val currenciesRepository: ICurrenciesRepository) :
ResultUseCase<String, UiCurrencies>(
backgroundContext = Dispatchers.IO,
foregroundContext = Dispatchers.Main
) {
override suspend fun executeOnBackground(params: String): UiCurrencies? =
currenciesRepository.getLatestCurrencies(params)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment