Skip to content

Instantly share code, notes, and snippets.

@selmanon
Last active February 1, 2017 23:12
Show Gist options
  • Save selmanon/05e413ad6e20428a336e62dea66ba0f8 to your computer and use it in GitHub Desktop.
Save selmanon/05e413ad6e20428a336e62dea66ba0f8 to your computer and use it in GitHub Desktop.
An organised draft of my time investment learning RxJava
public Observable<List<Profile>> reloadProfiles() {
return mJobAppApiService.getAllProfiles().subscribeOn(Schedulers.io())
.concatMap(new Func1<List<Profile>, Observable<List<Profile>>>() {
@Override
public Observable<List<Profile>> call(List<Profile> profiles) {
return mRealmProfileRepo.setProfiles(profiles);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment