I'm using RxBinding2 to listen for text changes in SearchView. I need to use separate logic with different debounce when user types smth in EditText. I tried this:
RxSearchView.queryTextChanges(searchView)
.debounce(500, TimeUnit.MILLISECONDS) // use debounce
.observeOn(AndroidSchedulers.mainThread())
.subscribe(query -> mPresenter.searchRequest(query));
RxSearchView.queryTextChanges(searchView) // no debounce required here
.observeOn(AndroidSchedulers.mainThread())
.subscribe(query -> mPresenter.updateUI(query));
RxSearchView.queryTextChanges overrides listener, so, of course, only second being called.
May I combine these two calls searchRequest and updateUI with different debounces into one rx-sequence? Should I use filter operator in someway?