These are chat archives for ReactiveX/RxJava

24th
Jan 2017
Scott Pierce
@ScottPierce
Jan 24 2017 03:08
Does anyone have any examples of how to use the new ObservableOperator?
it's to be used with the lift operator.
moonsweel
@moonsweel
Jan 24 2017 07:41
@ItsSelina flatMap?
Alexander Shpak
@alex-shpak
Jan 24 2017 09:18
@ItsSelina
Depends on behaviour that you want it might be:
List<Observable<Object>> list = new ArrayList<>();
Observable<List<Object>> result = Observable.from(list).flatMap(it -> it).toList();
result = Observable.merge(list).toList();
result = Observable.concatEager(list).toList();
Scott Pierce
@ScottPierce
Jan 24 2017 15:00
When should I use Observable.lift?
I was trying to use it to create a new operator, but I'm finding it difficult
Scott Pierce
@ScottPierce
Jan 24 2017 19:28
I posted my above question on Stack Overflow in a little more detail: http://stackoverflow.com/questions/41834506/creating-custom-operators-in-rxjava2
otaconix
@otaconix
Jan 24 2017 22:17
Hey everyone. My question might be stupid, and if it is, feel free to just say so. I want to use an observable as sort of a pubsub mechanism. The easiest way seems to be to use a Subject, but I was also wondering how one might do this in some other, perhaps more idiomatic way. Question: what might this other, more idiomatic way, be?