package Ġio . ex zo coin . wallet . modules . market . home Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . util . Log Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . recyclerview . widget . Concat Adapter Ċ import Ġio . ex zo coin . wallet . R Ċ import Ġio . ex zo coin . wallet . core . Base Fragment Ċ import Ġio . ex zo coin . wallet . modules . market .* Ċ import Ġio . ex zo coin . wallet . modules . market . list . Market List ViewModel Ċ import Ġio . ex zo coin . wallet . modules . coin . Coin Fragment Ċ import Ġio . ex zo coin . core . find Nav Controller Ċ import Ġio . ex zo coin . core . helpers . Hud Helper Ċ import Ġio . ex zo coin . wallet . core . managers . Project Manager Ċ import Ġio . ex zo coin . wallet . modules . transactions . Filter Adapter Ċ import Ġkotlinx . android . synt hetic . main . fragment _ market _ discovery . coin Rates RecyclerView Ċ import Ġkotlinx . android . synt hetic . main . fragment _ market _ home .* Ċ import Ġkotlinx . android . synt hetic . main . fragment _ market _ home . tab Layout Ċ Ċ class ĠMarket Home Fragment Ġ: ĠBase Fragment (), ĠViewHolder Market Item . Listener , ĊĠĠĠ ĠFilter Adapter . Listener Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġvm Factory Ġ= ĠMarket Home Discovery Module . Factory () ĊĊĠĠĠ Ġprivate Ġval Ġmarket Discovery ViewModel Ġby Ġview Models < Market Home ViewModel > Ġ{ Ġvm Factory Ġ} ĊĠĠĠ Ġprivate Ġval Ġmarket List ViewModel Ġby Ġview Models < Market List ViewModel > Ġ{ Ġvm Factory Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ market _ home , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġmarket Items Adapter Ġ= ĠMarket Items Adapter ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel . market View Items LiveData , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel . loading LiveData , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel . error LiveData , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġview Lifecycle Owner ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġval Ġmarket Loading Adapter Ġ= ĠMarket Loading Adapter ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel . loading LiveData , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel . error LiveData , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel :: onError Click , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġview Lifecycle Owner ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġfilter Adapter Ġ= ĠFilter Adapter ( this ) ĊĠĠĠĠĠĠĠ Ġre cycler Tags . adapter Ġ= Ġfilter Adapter ĊĊĠĠĠĠĠĠĠ Ġfilter Adapter . set Filters ( market List ViewModel . sorting Fields . map Ġ{ ĠFilter Adapter . Filter Item ( getString ( it . title Res Id )) ĊĠĠĠĠĠĠĠ Ġ}, ĠFilter Adapter . Filter Item ( getString ( market List ViewModel . sorting Field . title Res Id ))) ĊĊĠĠĠĠĠĠĠ Ġcoin Rates RecyclerView . adapter Ġ= ĠConcat Adapter ( market Loading Adapter , Ġmarket Items Adapter ) ĊĠĠĠĠĠĠĠ Ġcoin Rates RecyclerView . item Animator Ġ= Ġnull ĊĊĠĠĠĠĠĠĠ Ġ/* pull To Refresh . setOn Refresh Listener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmarket List ViewModel . refresh () ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġpull To Refresh . is Refresh ing Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ}*/ ĊĊĠĠĠĠĠĠĠ Ġmarket List ViewModel . network Not Available . observe ( view Lifecycle Owner , Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠH ud Helper . show ErrorMessage ( require View (), ĠR . string . Hud _ Text _ No Internet ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ ĠProject Manager . get Feature d Projects () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe ({ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġsize Ġ= Ġit . size ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLog . d (" Test ", Ġsize . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmarket Categories Adapter Ġ= ĠMarket Feature d Project Adapter ( require Context (), Ġtab Layout , Ġit ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}, Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLog . d (" Error ", Ġit . message . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ ĠProject Manager . get Ads () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe ({ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġsize Ġ= Ġit . size ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLog . d (" Test ", Ġsize . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmarket Ads Adapter Ġ= ĠMarket Ads Adapter ( require Context ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmarket Ads Adapter . set Items ( it ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġads Slider . set Slider Adapter ( market Ads Adapter ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}, Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLog . d (" Error ", Ġit . message . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Item Click ( market View Item : ĠMarket View Item ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġarguments Ġ= ĠCoin Fragment . prepare Params ( market View Item . coin Type , Ġmarket View Item . coin Code , Ġmarket View Item . coin Name ) ĊĊĠĠĠĠĠĠĠ Ġfind Nav Controller (). navigate ( R . id . coin Fragment , Ġarguments , Ġnav Options ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Filter Item Click ( ĊĠĠĠĠĠĠĠ Ġitem : ĠFilter Adapter . Filter Item ?, ĊĠĠĠĠĠĠĠ Ġitem Position : ĠInt , ĊĠĠĠĠĠĠĠ Ġitem Width : ĠInt ĊĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠĠĠ Ġ// TODO (" Not Ġyet Ġimplemented ") ĊĠĠĠĠĠĠĠ Ġval Ġselected Sorting Field Ġ= Ġmarket List ViewModel . sorting Fields [ item Position ] ĊĠĠĠĠĠĠĠ Ġmarket List ViewModel . update ( sorting Field Ġ= Ġselected Sorting Field ) ĊĠĠĠ Ġ} Ċ } Ċ