Lukas Lechner
CoroutineExceptionHandler
viewModelScope
ViewModel
Gabriel Feo
Christopher Elías
abstract class BaseViewModel : ViewModel() { private val mapperExceptionHandler = CoroutineExceptionHandler { _, throwable -> setErrorFromMapperPresentation(throwable.message) } val presentationMapperContext : CoroutineContext = <http://Dispatchers.IO|Dispatchers.IO> + mapperExceptionHandler
private val _ranking = MutableLiveData<SellRanking>()
val ranking : LiveData<RankingModel> = _ranking.switchMap {
liveData(presentationMapperContext) {
emit(mapper.rankingDomainToPresentation(it))
}
A modern programming language that makes developers happier.