package Ġcom . nick tra . movies quare . ui . favorite . f avor itet v shows Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . paging . Paged List Ċ import Ġcom . nick tra . movies quare . data . App Repository Ċ import Ġcom . nick tra . movies quare . data . source . local . entity . Show Entity Ċ Ċ class ĠF avorite Shows ViewModel Ġ( private Ġval Ġapp Repository : ĠApp Repository ) Ġ: ĠViewModel () Ġ{ ĊĠĠĠ Ġfun Ġget Favorite Shows (): ĠLive Data < Paged List < Show Entity >> Ġ= Ġapp Repository . get Favorite Shows () ĊĊĠĠĠ Ġfun Ġset Favorite Shows ( show Entity : ĠShow Entity ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠnewState Ġ= Ġ! show Entity . is Favorite ĊĠĠĠĠĠĠĠ Ġapp Repository . set Show Favorite ( show Entity , ĠnewState ) ĊĠĠĠ Ġ} Ċ }