package Ġorg . fo ss as ia . badge magic . ui . fragments Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġorg . fo ss as ia . badge magic . R Ċ import Ġorg . fo ss as ia . badge magic . data . Saved Cli part Ċ import Ġorg . fo ss as ia . badge magic . databinding . Fragment Saved Cli parts Binding Ċ import Ġorg . fo ss as ia . badge magic . ui . base . Base Fragment Ċ import Ġorg . fo ss as ia . badge magic . util . Image Utils Ċ import Ġorg . fo ss as ia . badge magic . view models . Saved Cli part ViewModel Ċ import Ġorg . k oin . android x . view model . ext . android . viewModel Ċ Ċ class ĠSaved Cli part Fragment Ġ: ĠBase Fragment () Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Jvm Static ĊĠĠĠĠĠĠĠ Ġfun Ġnew Instance () Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSaved Cli part Fragment () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval ĠviewModel Ġby ĠviewModel < Saved Cli part ViewModel >() ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbinding Ġ= ĠData Binding Util . inflate < Fragment Saved Cli parts Binding >( in flater , ĠR . layout . fragment _ saved _ cli parts , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġbinding . viewModel Ġ= ĠviewModel ĊĠĠĠĠĠĠĠ Ġreturn Ġbinding . root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ ĠviewModel . get Storage Cli part LiveData (). observe ( view Lifecycle Owner , ĠObserver Ġ{ Ġlist Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel . adapter . set List ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlist . map Ġ{ ĠSaved Cli part ( it . key , ĠImage Utils . convertTo Bitmap ( it . value )) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ }