I have an observable that wraps an HTTP request
mObservable = retryObservable(mService.getAddressList(getUserId(), true, 1, Integer.MAX_VALUE, "id", true) .map(r -> { return r.getItems(); }) .observeOn(AndroidSchedulers.mainThread()));
then subscription
mSubscription = mObservable.subscribe(items -> { mAddressAdapter.swapItems(items); }, getActivityBase()::showError);
When subscription initialization starts, cold watch is activated and an HTTP request is triggered. Now I know that the underlying data has changed, and I need to do the same, but a new request. I tried
mSubscription.unsubscribe();
then call
mObservable.subscribe(items -> {doSomething();})
again, since, in my opinion, the subscription should start observable, but it does not work. Any suggestions?
Petou source share