package Ġorg . simple . clin ic . on boarding Ċ Ċ import Ġcom . f 2 pr ate ek . rx . preferences 2 . Preference Ċ import Ġcom . spotify . mob ius . functions . Consumer Ċ import Ġcom . spotify . mob ius . rx 2 . Rx Mob ius Ċ import Ġdagger . ass isted . Ass isted Ċ import Ġdagger . ass isted . Ass isted Factory Ċ import Ġdagger . ass isted . Ass isted Inject Ċ import Ġio . reactivex . Observable Transformer Ċ import Ġorg . simple . clin ic . main . Typed Preference Ċ import Ġorg . simple . clin ic . main . Typed Preference . Type . On boarding Complete Ċ Ċ class ĠOn boarding Effect Handler Ġ@ Ass isted Inject Ġconstructor ( ĊĠĠĠ Ġ@ Typed Preference ( On boarding Complete ) Ġprivate Ġval Ġhas User Completed On boarding : ĠPreference < Boolean >, ĊĠĠĠ Ġ@ Ass isted Ġprivate Ġval Ġview Effects Consumer : ĠConsumer < On boarding View Effect > Ċ ) Ġ{ ĊĊĠ Ġ@ Ass isted Factory ĊĠ Ġinterface ĠFactory Ġ{ ĊĠĠĠ Ġfun Ġcreate ( ĊĠĠĠĠĠĠĠ Ġview Effects Consumer : ĠConsumer < On boarding View Effect > ĊĠĠĠ Ġ): ĠOn boarding Effect Handler ĊĠ Ġ} ĊĊĠ Ġfun Ġbuild (): ĠObservable Transformer < On boarding Effect , ĠOn boarding Event > Ġ{ ĊĠĠĠ Ġreturn ĠRx Mob ius ĊĠĠĠĠĠĠĠ Ġ. subtype Effect Handler < On boarding Effect , ĠOn boarding Event >() ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Complete On boarding Effect :: class . java , Ġcomplete On boarding Transformer ()) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( On boarding View Effect :: class . java , Ġview Effects Consumer :: accept ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġcomplete On boarding Transformer (): ĠObservable Transformer < Complete On boarding Effect , ĠOn boarding Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġcomplete On boarding Effect Ġ-> ĊĠĠĠĠĠ Ġcomplete On boarding Effect ĊĠĠĠĠĠĠĠĠĠ Ġ. do On Next Ġ{ Ġhas User Completed On boarding . set ( true ) Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠOn boarding Completed Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ