Joan Colmenero
07/27/2020, 12:05 PMObservable
let's call it repoObservable
and another one that returns a Single
let's call it repoSingle
so the thing is, everything before was calling only the repoObservable
but now we realised that we need that repoSingle
to be called as well, so what I'm trying to do is to subscribe both in the same Observable
I've tried to make it with two subscribe and it works, but I wanted to check if it's possible to make it in one observer.
What I'm trying is
repoObservable.getStream().zipWith(repoSingle.get().toObservable(), (BiFunction<User, User, Object>)(user, user1) -> {
updateUiWithUser(user); <-- should be from the
repoObservable.getStream()
showMessage();
}
but the thing is that it's not called, I wanted to know if is there any possibility to avoid doing something like :
repoObservable.observeOn(AndroidSheculers.mainThread())
.subscribe(...)
repoSingle.observeOn(AndroidSchedules.mainThread())
.subscribe(...)
gildor
07/27/2020, 12:39 PMJoan Colmenero
07/27/2020, 3:02 PMgildor
07/28/2020, 2:42 AM