package Ġcom . re vol gen x . an ilib . social . ui . view model Ċ Ċ import Ġcom . re vol gen x . an ilib . social . data . model . Like able Union Model Ċ import Ġcom . re vol gen x . an ilib . common . repository . util . Resource Ċ import Ġcom . re vol gen x . an ilib . infrastructure . service . toggle . Toggle Service Ċ import Ġcom . re vol gen x . an ilib . social . data . field . Delete Activity Reply Field Ċ import Ġcom . re vol gen x . an ilib . social . data . field . Toggle Like V 2 Field Ċ import Ġcom . re vol gen x . an ilib . social . data . model . reply . Activity Reply Model Ċ import Ġcom . re vol gen x . an ilib . social . infrastructure . service . Activity Union Service Ċ import Ġcom . re vol gen x . an ilib . type . Like able Type Ċ import Ġcom . re vol gen x . an ilib . common . view model . Base ViewModel Ċ Ċ class ĠActivity Reply ViewModel ( private Ġval Ġtoggle Service : ĠToggle Service , Ġprivate Ġval Ġactivity Union Service : ĠActivity Union Service ) Ġ: ĠBase ViewModel () Ġ{ ĊĠĠĠ Ġfun Ġtoggle Like ( model : ĠActivity Reply Model , Ġcallback : Ġ( Resource < Like able Union Model >) Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfield Ġ= ĠToggle Like V 2 Field (). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . id Ġ= Ġmodel . id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . type Ġ= ĠLike able Type . ACTIVITY _ REPLY ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġtoggle Service . toggle Like V 2 ( field , Ġcomposite Disposable , Ġcallback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġdelete Activity Reply ( id : ĠInt , Ġcallback : Ġ( Resource < Boolean >) Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfield Ġ= ĠDelete Activity Reply Field (). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . id Ġ= Ġid ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġactivity Union Service . delete Activity Reply ( field , Ġcomposite Disposable , Ġcallback ) ĊĠĠĠ Ġ} Ċ }