package Ġgr ack . dev . credit point app . features . login wal im ur id . history Ċ Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġgr ack . dev . credit point app . repository . login wal im ur id . history . History Repository Ċ import Ġgr ack . dev . credit point app . repository . login wal im ur id . history . model . History Response Ċ import Ġgr ack . dev . credit point app . repository . login wal im ur id . history . model . P el angg aran Ċ import Ġgr ack . dev . credit point app . repository . login wal im ur id . history . model . Pre st asi Ċ import Ġio . reactivex . Observable Ċ Ċ class ĠHistory ViewModel Ġ: ĠViewModel () Ġ{ ĊĊĠ Ġval Ġprest asi List Ġ= ĠMutable LiveData < List < Pre st asi >>() ĊĠ Ġval Ġpel angg aran List Ġ= ĠMutable LiveData < List < P el angg aran >>() ĊĊĠ Ġfun Ġload History ( id S is wa : ĠString ): ĠObservable < History Response > Ġ{ ĊĠĠĠ Ġreturn ĠHistory Repository . provide History P el angg aran ( id S is wa ) ĊĠĠĠĠĠ Ġ. map Ġ{ ĊĠĠĠĠĠĠĠ Ġprest asi List . value Ġ= Ġit . pel angg aran Parent ! ![ 0 ]?. prest asi Ġas ĠList < Pre st asi >? ĊĠĠĠĠĠĠĠ Ġpel angg aran List . value Ġ= Ġit . pel angg aran Parent ! ![ 0 ]?. pel angg aran Ġas ĠList < P el angg aran >? ĊĠĠĠĠĠĠĠ Ġit ĊĠĠĠĠĠ Ġ} ĊĠ Ġ} Ċ Ċ }