https://kotlinlang.org logo
Title
d

Daniel Rodak

07/18/2019, 7:14 AM
Is there cleaner way to zip Observable with Completable? So
actionIntent()
returns Observable and
loadFile()
returns Completable. I want to zip them and return Boolean value of the observable. Is this the right way to fit Completable?
g

gsala

07/18/2019, 8:43 AM
would this be the same
actionIntent().delay { loadFile().andThen(Observable.just(Unit) }
d

Daniel Rodak

07/18/2019, 12:39 PM
Thanks, but my question was focused if
loadFile().andThen(Observable.just(true))
is a correct way to chain Completable with Observable or should I do this in the other way
a

alexsullivan114

07/18/2019, 2:42 PM
Yeah, I think that's fine.
Just out of curiosity, what does
loadFile
do? My knee jerk reaction from the naming is that
loadFile
would be a
Single
with file contents.
d

Daniel Rodak

07/19/2019, 7:48 AM
Thanks,
loadFile
loads file that's hold by singleton injected by dagger so I don't need to return it from that method(that's why I decided to use Completable)