Skip to content

Commit

Permalink
Upgraded RxLint (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranpons authored Nov 28, 2017
1 parent b292293 commit 0531946
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion leku/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {
implementation "io.reactivex:rxandroid:1.2.1"
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'nl.littlerobots.rxlint:rxlint:1.5'
implementation 'nl.littlerobots.rxlint:rxlint:1.6'

androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import java.util.concurrent.TimeUnit;
import pl.charmas.android.reactivelocation2.ReactiveLocationProvider;

Expand Down Expand Up @@ -73,7 +74,7 @@ public void getFromLocationName(String query, LatLng lowerLeft, LatLng upperRigh
public void getDebouncedFromLocationName(String query, int debounceTime) {
view.willLoadLocation();
Disposable disposable = geocoderRepository.getFromLocationName(query)
.debounce(debounceTime, TimeUnit.MILLISECONDS)
.debounce(debounceTime, TimeUnit.MILLISECONDS, Schedulers.io())
.observeOn(scheduler)
.subscribe(view::showDebouncedLocations, throwable -> view.showLoadLocationError(),
view::didLoadLocation);
Expand All @@ -83,7 +84,7 @@ public void getDebouncedFromLocationName(String query, int debounceTime) {
public void getDebouncedFromLocationName(String query, LatLng lowerLeft, LatLng upperRight, int debounceTime) {
view.willLoadLocation();
Disposable disposable = geocoderRepository.getFromLocationName(query, lowerLeft, upperRight)
.debounce(debounceTime, TimeUnit.MILLISECONDS)
.debounce(debounceTime, TimeUnit.MILLISECONDS, Schedulers.io())
.observeOn(scheduler)
.subscribe(view::showDebouncedLocations, throwable -> view.showLoadLocationError(),
view::didLoadLocation);
Expand Down

0 comments on commit 0531946

Please sign in to comment.