package Ġcom . cons istence . pin yin . app . pin yin . detail Ċ Ċ import Ġandroid . app . Application Ċ import Ġcom . me mt rip . mx android . Mx ViewModel Ċ import Ġio . reactivex . Observable Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠP iny in Detail ViewModel Ġ@ Inject Ġinternal Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġp iny in Parcel : ĠP iny in Parcel , ĊĠĠĠ Ġapplication : ĠApplication Ċ ) Ġ: ĠM x ViewModel < P iny in Detail Intent , ĠP iny in Detail Render Action , ĠP iny in Detail ViewState >( ĊĠĠĠ ĠP iny in Detail ViewState ( ĊĠĠĠĠĠĠĠ Ġp iny in Parcel . phon etic Script Text , ĊĠĠĠĠĠĠĠ Ġp iny in Parcel . english Translation Text , ĊĠĠĠĠĠĠĠ Ġp iny in Parcel . chinese Characters , ĊĠĠĠĠĠĠĠ Ġp iny in Parcel . audio Src ĊĠĠĠ Ġ), ĊĠĠĠ Ġapplication Ċ ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġdispatcher ( intent : ĠP iny in Detail Intent ): ĠObservable < P iny in Detail Render Action > Ġ= Ġwhen Ġ( intent ) Ġ{ ĊĠĠĠĠĠĠĠ Ġis ĠP iny in Detail Intent . Idle Ġ-> ĠObservable . just ( P iny in Detail Render Action . Idle ) ĊĠĠĠĠĠĠĠ ĠP iny in Detail Intent . Play Audio Ġ-> ĠObservable . just ( P iny in Detail Render Action . Play Audio ( pin yin Parcel . audio Src !! )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġreducer ( previous State : ĠP iny in Detail ViewState , Ġrender Action : ĠP iny in Detail Render Action ): ĠP iny in Detail ViewState Ġ= Ġwhen Ġ( render Action ) Ġ{ ĊĠĠĠĠĠĠĠ ĠP iny in Detail Render Action . Idle Ġ-> Ġprevious State . copy ( action Ġ= ĠP iny in Detail ViewState . Action . None ) ĊĠĠĠĠĠĠĠ Ġis ĠP iny in Detail Render Action . Play Audio Ġ-> Ġprevious State . copy ( action Ġ= ĠP iny in Detail ViewState . Action . Play Audio ( render Action . audio Src )) ĊĠĠĠ Ġ} Ċ }