package Ġir . gh ar are mag hz ha . game . view models Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġir . gh ar are mag hz ha . game . data . Api Repository Ċ import Ġir . gh ar are mag hz ha . game . data . Resource Ċ import Ġir . gh ar are mag hz ha . game . models . Buy History Response Ċ import Ġir . gh ar are mag hz ha . game . models . General Response Ċ import Ġir . gh ar are mag hz ha . game . models . High score Response Ċ import Ġkotlinx . coroutines . launch Ċ Ċ class ĠProfile Edit ViewModel ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġapi Repository : ĠApi Repository Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġ_ remove Avatar Response : ĠMutable LiveData < Resource < General Response >> Ġ= ĠMutable LiveData () ĊĠĠĠ Ġval Ġremove Avatar Response : ĠLive Data < Resource < General Response >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ remove Avatar Response ĊĊĠĠĠ Ġfun Ġremove Avatar ( token : ĠString , number : ĠString , avatar : String ) Ġ= ĠviewModel Scope . launch Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ remove Avatar Response . value Ġ= Ġapi Repository . alter Avatar ( token , number ," remove ", Ġ"", Ġavatar ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġprivate Ġval Ġ_ change Avatar Response : ĠMutable LiveData < Resource < General Response >> Ġ= ĠMutable LiveData () ĊĠĠĠ Ġval Ġchange Avatar Response : ĠLive Data < Resource < General Response >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ change Avatar Response ĊĊĠĠĠ Ġfun Ġchange Avatar ( token : ĠString , number : ĠString , image : String , avatar : String ) Ġ= ĠviewModel Scope . launch Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ change Avatar Response . value Ġ= Ġapi Repository . alter Avatar ( token , number ," change ", Ġimage , Ġavatar ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġ_ update Profile Response : ĠMutable LiveData < Resource < General Response >> Ġ= ĠMutable LiveData () ĊĠĠĠ Ġval Ġupdate Profile Response : ĠLive Data < Resource < General Response >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ update Profile Response ĊĊĠĠĠ Ġfun Ġupdate Profile ( token : ĠString , number : ĠString , name : String , Ġemail : String , Ġb day : String , Ġsex : String , Ġinvite Code : String ) Ġ= ĠviewModel Scope . launch Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ update Profile Response . value Ġ= Ġapi Repository . update Profile ( token , number , name , email , b day , sex , invite Code ) ĊĠĠĠ Ġ} Ċ Ċ }