package Ġcom . max im erous sy . trend hub . presentation . detail Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . max im erous sy . trend hub . domain . models . Github Repository Ċ import Ġcom . max im erous sy . trend hub . domain . models . Github Repository Content File Ċ import Ġcom . max im erous sy . trend hub . domain . models . Github Repository Detail Ċ import Ġcom . max im erous sy . trend hub . domain . models . Github Repository Read me Ċ import Ġcom . max im erous sy . trend hub . domain . use cases . Get Github Repository Contents Ċ import Ġcom . max im erous sy . trend hub . domain . use cases . Get Github Repository Details Ċ import Ġcom . max im erous sy . trend hub . domain . use cases . Get Github Repository Read me Ċ import Ġcom . max im erous sy . trend hub . presentation . Single Live Event Ċ import Ġcom . max im erous sy . trend hub . util . addTo Ċ import Ġio . reactivex . dis pos ables . Composite Disposable Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠRepository Detail ViewModel Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġget Github Repository Details : ĠGet Github Repository Details , ĊĠĠĠ Ġprivate Ġval Ġget Github Repository Contents : ĠGet Github Repository Contents , ĊĠĠĠ Ġprivate Ġval Ġget Github Repository Read me : ĠGet Github Repository Read me Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠ Ġprivate Ġval Ġdis pos ables Ġ= ĠComposite Disposable () ĊĠ Ġprivate Ġval Ġrepository Details Ġ= ĠMutable LiveData < Github Repository Detail >() ĊĠ Ġprivate Ġval Ġrepository Read me Ġ= ĠMutable LiveData < Github Repository Read me >() ĊĠ Ġprivate Ġval Ġrepository Contents Ġ= ĠMutable LiveData < List < Github Repository Content File >>() ĊĠ Ġprivate Ġval Ġrepository Loading Error Ġ= ĠSingle Live Event < Any >() ĊĊĠ Ġval Ġget Repository Details : ĠLive Data < Github Repository Detail > ĊĠĠĠ Ġget () Ġ= Ġrepository Details ĊĊĠ Ġval Ġget Repository Read me : ĠLive Data < Github Repository Read me > ĊĠĠĠ Ġget () Ġ= Ġrepository Read me ĊĊĠ Ġval Ġget Repository Contents : ĠLive Data < List < Github Repository Content File >> ĊĠĠĠ Ġget () Ġ= Ġrepository Contents ĊĊĠ Ġval Ġget Repository Loading Error : ĠLive Data < Any > ĊĠĠĠ Ġget () Ġ= Ġrepository Loading Error ĊĊĠ Ġfun Ġfetch Data ( github Repository : ĠGithub Repository ) Ġ{ ĊĠĠĠ Ġload Repository Details ( github Repository ) ĊĠĠĠ Ġload Repository Contents ( github Repository ) ĊĠĠĠ Ġload Repository Read me ( github Repository ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Repository Details ( github Repository : ĠGithub Repository ) Ġ{ ĊĠĠĠ Ġget Github Repository Details . execute ( github Repository ) ĊĠĠĠĠĠĠĠ Ġ. subscribe ({ Ġresult Ġ-> Ġrepository Details . value Ġ= Ġresult Ġ}, Ġ{ Ġrepository Loading Error . call () Ġ}) ĊĠĠĠĠĠĠĠ Ġ. addTo ( dis pos ables ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Repository Contents ( github Repository : ĠGithub Repository ) Ġ{ ĊĠĠĠ Ġget Github Repository Contents . execute ( github Repository ) ĊĠĠĠĠĠĠĠ Ġ. subscribe ({ Ġresult Ġ-> Ġrepository Contents . value Ġ= Ġresult Ġ}, Ġ{ Ġrepository Loading Error . call () Ġ}) ĊĠĠĠĠĠĠĠ Ġ. addTo ( dis pos ables ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Repository Read me ( github Repository : ĠGithub Repository ) Ġ{ ĊĠĠĠ Ġget Github Repository Read me . execute ( github Repository ) ĊĠĠĠĠĠĠĠ Ġ. subscribe ({ Ġresult Ġ-> Ġrepository Read me . value Ġ= Ġresult Ġ}, Ġ{ Ġrepository Loading Error . call () Ġ}) ĊĠĠĠĠĠĠĠ Ġ. addTo ( dis pos ables ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Cle ared () Ġ{ ĊĠĠĠ Ġdis pos ables . clear () ĊĠĠĠ Ġsuper . on Cle ared () ĊĠ Ġ} Ċ } Ċ