I discovered that once Completable is done (method of CompletableEmitter.onComplete() is called), the chain stops and all operators are not called.
So I have the following source code
Completable setup() {
...
}
....
payment.setup()
.toObservable()
.flatMap(new Function<Object, ObservableSource<List<String>>() {
@Override
public ObservableSource<String>> apply(@io.reactivex.annotations.NonNull Object o) throws Exception {
return "Some mapping is here";
}
});
Once setup() method finished successfully, flatMap() is not called. Is it supposed to be so? Is it possible to have a chain to Completable?
Completable does not have values and flatMap doesn't work without values. Use Completable.andThen.
Perfect. Thanks!
Most helpful comment
Completabledoes not have values andflatMapdoesn't work without values. UseCompletable.andThen.