package Ġcom . cost ular . mar vel hero es . presentation . her ode tail Ċ Ċ import Ġandroid . arch . lifecycle . Mutable LiveData Ċ import Ġcom . cost ular . mar vel hero es . data . repository . Mar vel Hero es Repository Impl Ċ import Ġcom . cost ular . mar vel hero es . domain . model . Mar vel Hero Entity Ċ import Ġcom . cost ular . mar vel hero es . presentation . util . mv vm . Base ViewModel Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . android . schedul ers . Android Schedulers Ċ import Ġio . reactivex . rx kotlin . addTo Ċ import Ġio . reactivex . schedul ers . Schedulers Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠMar vel Hero Detail ViewModel Ġ@ Inject Ġconstructor ( private Ġval Ġmar vel Hero es Repository Impl : ĠMar vel Hero es Repository Impl ) Ġ: ĠBase ViewModel (){ ĊĠĠĠ Ġvar Ġhero State : ĠMutable LiveData < Mar vel Hero Entity > Ġ= ĠMutable LiveData () ĊĊĠĠĠ Ġfun Ġupdate Mar vel Hero ( hero : ĠMar vel Hero Entity ){ ĊĠĠĠĠĠĠĠ ĠObservable . from Callable Ġ{ Ġ Ġmar vel Hero es Repository Impl . update Mar vel Hero ( hero ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . io ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. observe On ( Android Schedulers . main Thread ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġhero State . value Ġ= Ġhero ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. addTo ( composite Disposable ) ĊĠĠĠ Ġ} Ċ }