These are chat archives for ReactiveX/RxJava

19th
Feb 2016
Boy Wang
@boyw165
Feb 19 2016 02:59

In the jakewharton/rxbinding/view/ViewClickOnSubscribe::call, these codes seems like to unset the OnClickListener when unsubscribe.

    subscriber.add(new MainThreadSubscription() {
      @Override protected void onUnsubscribe() {
        view.setOnClickListener(null);
      }
    });

I know subscription is the cancelling token returned when an observer subscribe to an observable. And what does it mean by adding a subscription to an observer?

Artem Zinnatullin :slowpoke:
@artem-zinnatullin
Feb 19 2016 04:02
@boyw165 added Subscription will be unsubscribed with parent one, add is really bad name, yeah… but it's public api, so we can't change it so easily
Boy Wang
@boyw165
Feb 19 2016 04:17
@artem-zinnatullin so the whole traversal of processing observers is actually done in the tree of subscription?
Artem Zinnatullin :slowpoke:
@artem-zinnatullin
Feb 19 2016 05:41
@boyw165 depends on what do you mean by traversal of processing observers, basically add(subscription) used only for releasing resources