These are chat archives for ReactiveX/RxJava

Sep 2017
Artem Rudometkin
Sep 11 2017 08:37
Seems like you want to filter your items.
Ilya Krol
Sep 11 2017 16:41

Hi everyone! I am struggling to find a way to execute the command currently in the 'andThen' only when the upstream completable completes successfully without an error. Is there a better way other than saving the error state in a variable, which is quite ugly?

    .flatMapCompletable { possiblyExceptionCompletable }
    .onErrorResumeNext { updateInteractor(failure) }

In this scenario if possiblyExceptionCompletable throws an exception - both the success and failure updates occur.

Sep 11 2017 17:10
if I were to do: test.switchMap(blah) when test completes does the most recent observable get unsubscribed?
value.flatMap(ignored -> opThatMightFail()
                                    .map(result -> new State(result)) //result is in
                                    .startWith(new State()) //Loading
                                    .onErrorReturn(throwable -> new State(throwable)))
           .doOnNext(state -> updateInteractor(state))