Rx Searchview Needs To Cancel On Going Request With Less Priority
I am using RxSearchView.queryTextChangeEvents to detect the events of “Search As You Type” and also when you submit a search, SAYT is to get suggestions and when you do a s
Solution 1:
You might want to try switchMap
instead, it just uses the last emited value from the observable.
From the docs:
Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables. The resulting Observable completes if both the upstream Observable and the last inner Observable, if any, complete. If the upstream Observable signals an onError, the inner Observable is unsubscribed and the error delivered in-sequence.
Post a Comment for "Rx Searchview Needs To Cancel On Going Request With Less Priority"