package Ġcom . d roid con . schedule . ui . schedule list . view model Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . d roid con . commons . lifecycle . Single Live Event Ċ import Ġcom . d roid con . schedule . domain . Register Show Initial Schedule Tab Try Ċ import Ġcom . d roid con . schedule . domain . Should Try Switch ing To Initial Schedule Tab Ċ import Ġcom . d roid con . schedule . ui . schedule list . logic . Get Initial Schedule Tab Ċ import Ġcom . d roid con . schedule . ui . schedule list . model . Initial Schedule Tab Ċ import Ġcom . d roid con . schedule . ui . schedule list . model . Schedule Effect Ċ import Ġcom . d roid con . schedule . ui . schedule list . model . Schedule Tab Ċ Ċ class ĠSchedule ViewModel ( ĊĠĠĠ Ġprivate Ġval Ġget Initial Schedule Tab : ĠGet Initial Schedule Tab , ĊĠĠĠ Ġprivate Ġval Ġshould Try Switch ing To Initial Schedule Tab : ĠShould Try Switch ing To Initial Schedule Tab , ĊĠĠĠ Ġprivate Ġval Ġregister Show Initial Schedule Tab Try : ĠRegister Show Initial Schedule Tab Try Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġmutable Schedule Effects Ġ= ĠSingle Live Event < Schedule Effect >() ĊĠĠĠ Ġval Ġschedule Effects : ĠLive Data < Schedule Effect > Ġ= Ġmutable Schedule Effects ĊĊĠĠĠ Ġfun Ġon Schedule Visible () Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(! should Try Switch ing To Initial Schedule Tab ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġregister Show Initial Schedule Tab Try () ĊĊĠĠĠĠĠĠĠ Ġwhen Ġ( val Ġinitial Schedule Tab Ġ= Ġget Initial Schedule Tab ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠInitial Schedule Tab . None Ġ-> ĠUnit ĊĠĠĠĠĠĠĠĠĠĠĠ Ġis ĠInitial Schedule Tab . Some Ġ-> Ġemit Switch To Tab Effect ( initial Schedule Tab . schedule Tab ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Search Clicked () Ġ{ ĊĠĠĠĠĠĠĠ Ġmutable Schedule Effects . setValue ( Schedule Effect . Navigate To Search Sessions ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġemit Switch To Tab Effect ( tab : ĠSchedule Tab ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmutable Schedule Effects . setValue ( Schedule Effect . Switch To Tab ( tab )) ĊĠĠĠ Ġ} Ċ }