Skip to content

Instantly share code, notes, and snippets.

@ShellyDong
ShellyDong / rxjava.java
Created April 21, 2016 08:16 — forked from yongjhih/rxjava.java
RxJava
Observable.merge(Observable.from(getRawSelfPosts()), Observable.from(getRawFriendPosts()), Observable.from(getRawNearbyPosts(activity)))
.distinct((post) -> post.getObjectId())
.subscribeOn(Schedulers.io());
getRawPostsObs(activity).map((post) -> postToCardModel(post));
new RxList(getRawPostsObs(activity));
getPostsObs(activity).toList().toBlocking().single();