package Ġcom . no he lt cj . starter . android . ui . extension Ċ Ċ import Ġandroidx . lifecycle .* Ċ import Ġcom . no he lt cj . rx common . dis pos ables . Composite Dispose Bag Ċ import Ġcom . no he lt cj . rx common . dis pos ables . Dis pos ables Ċ import Ġcom . no he lt cj . rx common . ob servers . Next Observer Ċ import Ġcom . no he lt cj . rx common . subjects . Subject Ċ import Ġcom . no he lt cj . starter . binding . Binding Relay Ċ import Ġcom . no he lt cj . starter . binding . Inline Bi Direction al Binding Ċ Ċ fun Ġ< E > ĠSubject < E >. to LiveData ( dispose Bag : ĠComposite Dispose Bag ): ĠLive Data < E > Ġ{ ĊĠĠĠ Ġval Ġlive Data Ġ= ĠMutable LiveData < E >() ĊĊĠĠĠ Ġdispose Bag . add ( subscribe ( Next Observer Ġ{ ĊĠĠĠĠĠĠĠ Ġlive Data . post Value ( it ) ĊĠĠĠ Ġ})) ĊĊĠĠĠ Ġreturn Ġlive Data Ċ } Ċ Ċ fun Ġ< E > ĠBinding Relay < E >. to LiveData ( dispose Bag : ĠComposite Dispose Bag ): ĠMutable LiveData < E > Ġ{ ĊĠĠĠ Ġval Ġlive Data Ġ= ĠMutable LiveData < E >() ĊĠĠĠ Ġval Ġbinding Ġ= ĠInline Bi Direction al Binding ( ĊĠĠĠĠĠĠĠ Ġon Next Ġ= Ġ{ Ġemission Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlive Data . post Value ( em ission ) ĊĠĠĠĠĠĠĠ Ġ}, ĊĠĠĠĠĠĠĠ Ġrelay Ġ= Ġthis , ĊĠĠĠĠĠĠĠ Ġtransform For Upstream Block Ġ= Ġ{ Ġit Ġ}, ĊĠĠĠĠĠĠĠ Ġtransform For Subscriber Block Ġ= Ġ{ Ġit Ġ} ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġobserver Ġ= ĠObserver < E > Ġ{ ĊĠĠĠĠĠĠĠ Ġbinding . on Subscriber Updated Loc ally ( it ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġdispose Bag . add ( binding ) ĊĠĠĠ Ġdispose Bag . add ( Dis pos ables . create Ġ{ ĊĠĠĠĠĠĠĠ Ġlive Data . remove Observer ( observer ) ĊĠĠĠ Ġ}) ĊĊĠĠĠ Ġlive Data . observe Fore ver ( observer ) ĊĠĠĠ Ġbinding . start () ĊĊĠĠĠ Ġreturn Ġlive Data Ċ } Ċ