package Ġio . m ns . base . app . ui . view models Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . lifecycle . Android ViewModel Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġio . m ns . base . app . data . Done Item Ċ import Ġio . m ns . base . app . data . Todo Repository Ċ import Ġorg . k oin . core . K oin Component Ċ import Ġorg . k oin . core . inject Ċ Ċ class ĠDone ViewModel ( application : ĠApplication ) Ġ: ĠAndroid ViewModel ( application ), ĠK oin Component Ġ{ ĊĠĠĠ Ġprivate Ġval Ġrepository : ĠTodo Repository Ġby Ġinject () ĊĊĠĠĠ Ġprivate Ġval Ġ_ setting Clicked : ĠMutable LiveData < Boolean > Ġ= ĠMutable LiveData ( false ) ĊĠĠĠ Ġval Ġsetting Clicked : ĠLive Data < Boolean > ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ setting Clicked ĊĊĠĠĠ Ġfun Ġload Items (): ĠLive Data < List < Done Item >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . load Done Items () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġsetting Clicked () Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ setting Clicked . post Value ( true ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġsetting Handled () Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ setting Clicked . post Value ( false ) ĊĠĠĠ Ġ} Ċ } Ċ