Looking for Rxjava operator to merge sources into one stream
Looking for Rxjava operator to merge sources into one stream currently have this
Disposable observable = Observable.concat(
service.loadPopCells().toObservable(),
service.loadChallangeData().toObservable(),
service.loadUserCell().toObservable()
)
.subscribe(data->sendtoViewmodel(data)); // called 3 times
i have 3 stream , so on subscribe is called three time, but i want it to be called once with all data
looking to get something like this
Disposable observable = Observable.concat(
service.loadPopCells().toObservable(),
service.loadChallangeData().toObservable(),
service.loadUserCell().toObservable()
)
// i want to achieve something like this
.mapallresult(data,data2,data3){
private List<SimpleCell> shots = new ArrayList<>();
shots.add(data);
shots.add(data2);
shots.add(data2);
return shots; }
///
.subscribe(dataList->sendtoViewmodel(dataList); // called once