package Ġorg . simple . clin ic . home Ċ Ċ 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 Ċ import Ġio . reactivex . Observable Transformer Ċ import Ġorg . simple . clin ic . facility . Facility Ċ import Ġorg . simple . clin ic . patient . Patient Repository Ċ import Ġorg . simple . clin ic . util . scheduler . Schedulers Provider Ċ Ċ class ĠHome Screen Effect Handler Ġ@ Ass isted Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġcurrent Facility Stream : ĠObservable < Facility >, ĊĠĠĠ Ġval Ġpatient Repository : ĠPatient Repository , ĊĠĠĠ Ġprivate Ġval Ġs chedulers Provider : ĠS chedulers Provider , ĊĠĠĠ Ġ@ Ass isted Ġprivate Ġval Ġui Actions : ĠHome Screen Ui Actions Ċ ) Ġ{ ĊĊĠ Ġ@ Ass isted Factory ĊĠ Ġinterface ĠFactory Ġ{ ĊĠĠĠ Ġfun Ġcreate ( ui Actions : ĠHome Screen Ui Actions ): ĠHome Screen Effect Handler ĊĠ Ġ} ĊĊĠ Ġfun Ġbuild (): ĠObservable Transformer < Home Screen Effect , ĠHome Screen Event > Ġ= ĠRx Mob ius ĊĠĠĠĠĠ Ġ. subtype Effect Handler < Home Screen Effect , ĠHome Screen Event >() ĊĠĠĠĠĠ Ġ. addAction ( Open Facility Selection :: class . java , Ġui Actions :: open Facility Selection , Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠ Ġ. add Transformer ( Load Current Facility :: class . java , Ġload Current Facility ()) ĊĠĠĠĠĠ Ġ. build () ĊĊĠ Ġprivate Ġfun Ġload Current Facility (): ĠObservable Transformer < Load Current Facility , ĠHome Screen Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( schedul ers Provider . io ()) ĊĠĠĠĠĠĠĠĠĠ Ġ. switch Map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcurrent Facility Stream ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map (:: Current Facility Loaded ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ