These are chat archives for ReactiveX/RxJava

Sep 2017
Ilya Krol
Sep 12 2017 05:39

@Exerosis thanks for the response, but this has the same effect, assuming that the outcome of the flatMap is a Completable and I use andThen instead of doOnNext. I could make it doOnNext (doOnComplete actually as the result is a Completable), and this is how i currently solved this, but the updateInteractor is a Completable also, so this breaks the stream somewhat as I subscribe to this different stream in the side effect operator. It works but it looks ugly and I wonder if there is a better option which keeps me within the same stream for all operations. as a clarification this is how my code looks right now (roughly):

    .flatMapCompletable { possiblyExceptionCompletable }
    .doOnComplete { updateInteractor(success).subscribeOn( }
    .doOnError { updateInteractor(failure).subscribeOn( }

I want to get rid of the two subscriptions mid-stream.