package Ġcom . mean ing less . power hour . ui . settings Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . lifecycle . Android ViewModel Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġcom . mean ing less . power hour . data . database . DataManager Ċ import Ġcom . mean ing less . power hour . data . models . Game Config Ċ Ċ class ĠSettings ViewModel ( application : ĠApplication ) Ġ: ĠAndroid ViewModel ( application ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġ_ max Round s Ġ= ĠMutable LiveData < Int >() ĊĠĠĠ Ġprivate Ġval Ġ_ is Logged Out Ġ= ĠMutable LiveData < Boolean >() ĊĊĠĠĠ Ġval Ġmax Round s : ĠLive Data < Int > Ġ= Ġ_ max Round s ĊĠĠĠ Ġval Ġis Logged Out : ĠLive Data < Boolean > Ġ= Ġ_ is Logged Out ĊĊĠĠĠ Ġfun Ġset Max Round s ( rounds : ĠInt ) Ġ{ Ċ // ĠĠĠĠĠĠĠ Ġval Ġconfig Ġ= ĠData Manager . get Game Config ( getApplication ()) Ġ?: ĠGame Config () Ċ // ĠĠĠĠĠĠĠ Ġconfig ?. round Duration Ġ= Ġduration Ċ // ĠĠĠĠĠĠĠ ĠData Manager . set Game Config () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset Round Duration ( duration : ĠLong ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġconfig Ġ= ĠData Manager . get Game Config ( getApplication ()) Ġ?: ĠGame Config () ĊĠĠĠĠĠĠĠ Ġconfig ?. round Duration Ġ= Ġduration ĊĠĠĠĠĠĠĠ Ġ// DataManager . set Game Config () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġlogout () Ġ{ ĊĠĠĠĠĠĠĠ ĠData Manager . set Music API Authorization Data ( getApplication (), Ġnull ) ĊĠĠĠ Ġ} Ċ }