These are chat archives for ReactiveX/RxJava

25th
Aug 2018
Viktor Vostrikov
@wellbranding
Aug 25 2018 15:20
I have previously used MediatorLiveData to combine results from FCM, Room and Networking in my Repository. It worked well. However, now I want more complexity and some additional bonuses from RxJava. This is why I have decided to use RxJava this time. I can combine Room and Networking with Observable.concatArrayEager(my _observables) also I have used merge, but I want to get only latest changed value, not all observables, like it is done with MediatorLiveData However, I don't now how to do that after FCM pushes value, and how should I notify my main observable after new changes occur? No examples on this issue whatsoever. It is crucial part. I receive FCM in my BroadCastReceiver and then notified my repository's livedata, which notified my MediatorLiveData... How to do that with RxJava? Would really welcome any advice, because it is really important issue.
David Karnok
@akarnokd
Aug 25 2018 18:43
@igorbzin_gitlab Put the doOnNext between the subscribeOn and observeOn.
James Fleming
@Flemingjp
Aug 25 2018 23:20
Hello, I'm trying to get my head around trying to open a stream, buffering the items it emits until an async task has completed (this case a web request) and then process all the buffered items and the items following (if any).