package Ġcom . soft sand r . db x . ui Ċ Ċ import Ġcom . dropbox . core . v 2 . files . Db x User Files Requests Ċ import Ġcom . dropbox . core . v 2 . files . List Folder Result Ċ import Ġcom . soft sand r . db x . client . Db x Client Ċ import Ġrx . Observable Ċ import Ġrx . android . schedul ers . Android Schedulers Ċ import Ġrx . functions . Func 1 Ċ import Ġrx . schedul ers . Schedulers Ċ Ċ object ĠFiles Utils Ġ{ ĊĠĠĠ Ġfun Ġload Files ( client : ĠD bx Client , Ġdirectory : ĠString ): ĠObservable < List Folder Result ?> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠObservable . just ( client . files ()). flatMap ( Func 1 < Db x User Files Requests , ĠObservable < List Folder Result ? >> Ġ{ Ġdb x User Files Requests Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn @ Func 1 ĠObservable . just ( db x User Files Requests . list Folder ( directory )) ĊĠĠĠĠĠĠĠ Ġ}). subscribe On ( Schedulers . io ()). observe On ( Android Schedulers . main Thread ()) ĊĠĠĠ Ġ} Ċ }