These are chat archives for ReactiveX/RxJava

26th
Aug 2016
Srepfler Srdan
@schrepfler
Aug 26 2016 01:07
:clap:
Michael Nitschinger
@daschl
Aug 26 2016 06:39
@akarnokd no custom operators :)
we are using a custom subject but I can port it and/or get rid of it if there is a better alternative
I’m more concerned about if I add both to the classpath people might mess up their code (we have lots of users that are new to reactive programming)
Enver Balalic
@Enverbalalic
Aug 26 2016 16:05
Hi guys, just a quick question that I cant seem to solve. Is there a way to resubscribe to the same observable, with the same observer on every onComplete or onError, I know that there is a retry() option to resubscribe onError, I also tried doOnCompleted, doOnTerminate, doAfterTerminate to resubscribe but i cant seem to solve this
it looks something like this
Observer<Object> observer = new Observer<Object>() {
     lifecycle methods
}
Observable<Object> observable = function_returns_observable()
     .subscribeOn(Schedulers.newThread())
     .observeOn(AndroidSchedulers.mainThread())
     .subscribe(observer);
observable.doAfterTerminate(()-> observable.subscribe(observer);
observable.subscribe(observer);
Enver Balalic
@Enverbalalic
Aug 26 2016 16:10
right now im just exploiting the onError retry() parameter
and instead of calling onComplete when my observable finishes
i just call onError
and the retry() parameter catches that
which is, horrible....