For those guys who are experienced in RxJava2 I have a question.
Here is my method (code simplified):
public void getRows(){
/*ui clear*/
helper.getObservable(argumentRowsDependOn)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(row -> {
/* now, I'm showing each row to user*/
});
}
Creating a row might be high time-consuming operation, so I'm updating UI after each emission.
Problem is that method getRows()
being called multiple times, and I need to show user only last set of emissions.
Is it possible to unsubscribe from outdated emissions?
Do you have any suggestions?
Thanks in advance.