package Ġcom . rival di . github user app . ui . main Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . rival di . github user app . data . repository . UserRepository Ċ import Ġcom . rival di . github user app . util . Cor outines Ċ import Ġcom . rival di . github user app . util . ext . post Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠMain ViewModel Ġ@ Inject Ċ constructor ( ĊĠĠĠ Ġprivate Ġval Ġuser Repository : ĠUser Repository Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġval Ġuser Ġ= Ġuser Repository . search Response ĊĠĠĠ Ġval Ġsearch Text : ĠLive Data < String > Ġ= ĠMutable LiveData () ĊĊĠĠĠ Ġfun Ġsearch User ( username : ĠString ) Ġ= ĠCor outines . io Ġ{ ĊĠĠĠĠĠĠĠ Ġsearch Text . post ( username ) ĊĠĠĠĠĠĠĠ Ġuser Repository . search ( username ) ĊĠĠĠ Ġ} Ċ Ċ }