package Ġcom . mas ai _ technology . movies application . view model Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . mas ai _ technology . movies application . database . Database Client Ċ import Ġcom . mas ai _ technology . movies application . database . Users Movie Ċ import Ġcom . mas ai _ technology . movies application . model . Results Item Ċ import Ġkotlinx . coroutines . Coroutine Scope Ċ import Ġkotlinx . coroutines . Dispatch ers . IO Ċ import Ġkotlinx . coroutines . launch Ċ Ċ class ĠList Users Movie ViewModel ( private Ġval Ġcontext : ĠContext ) Ġ: ĠViewModel () Ġ{ ĊĠĠĠ Ġfun Ġfetch Data From DB (): ĠLive Data < List < Users Movie >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠDatabase Client . getInstance ( context ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. result Dao . get Watch List () ĊĠĠĠ Ġ} ĊĠĠĠ Ġfun Ġdelete User ( user : ĠUsers Movie ) Ġ{ ĊĠĠĠĠĠĠĠ ĠCor outine Scope ( IO ). launch Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠDatabase Client . getInstance ( context ). result Dao . remove Watch List ( user ) ĊĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }