/* Ċ Ġ* ĠCopyright Ġ 2 0 1 7 ĠAlex ey ĠS ht ank o Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ* Ċ Ġ*/ Ċ Ċ package Ġio . s ht ank o . pic as ag allery . extensions Ċ Ċ import Ġio . reactivex . Flow able Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . Scheduler Ċ import Ġio . reactivex . Single Ċ import Ġio . reactivex . android . schedul ers . Android Schedulers Ċ import Ġio . reactivex . schedul ers . Schedulers Ċ Ċ // Observable Ċ fun Ġ< T > ĠObservable < T >. apply Io Scheduler () Ġ= Ġapply Scheduler ( Schedulers . io ()) Ċ Ċ fun Ġ< T > ĠObservable < T >. apply Computation Scheduler () Ġ= Ġapply Scheduler ( Schedulers . computation ()) Ċ Ċ private Ġfun Ġ< T > ĠObservable < T >. apply Scheduler ( scheduler : ĠScheduler ) Ġ= ĊĠ Ġsubscribe On ( scheduler ). observe On ( Android Schedulers . main Thread ()) Ċ Ċ // Single Ċ fun Ġ< T > ĠSingle < T >. apply Io Scheduler () Ġ= Ġapply Scheduler ( Schedulers . io ()) Ċ Ċ fun Ġ< T > ĠSingle < T >. apply Computation Scheduler () Ġ= Ġapply Scheduler ( Schedulers . computation ()) Ċ private Ġfun Ġ< T > ĠSingle < T >. apply Scheduler ( scheduler : ĠScheduler ) Ġ= ĊĠ Ġsubscribe On ( scheduler ). observe On ( Android Schedulers . main Thread ()) Ċ Ċ // Flow able Ċ fun Ġ< T > ĠFlow able < T >. apply Io Scheduler () Ġ= Ġapply Scheduler ( Schedulers . io ()) Ċ Ċ fun Ġ< T > ĠFlow able < T >. apply Computation Scheduler (): ĠFlow able < T > Ġ= Ġapply Scheduler ( ĊĠĠĠ ĠS chedulers . computation () Ċ ) Ċ Ċ private Ġfun Ġ< T > ĠFlow able < T >. apply Scheduler ( scheduler : ĠScheduler ) Ġ= ĊĠ Ġsubscribe On ( scheduler ). observe On ( Android Schedulers . main Thread ()) ĊĊĊ