Skip to content

Commit

Permalink
Update rxjava/rxandroid to version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
friederbluemle committed Mar 10, 2017
1 parent 74593dc commit ab063c6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle
Expand Up @@ -43,6 +43,7 @@ android {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/rxjava.properties'
}

productFlavors {
Expand Down Expand Up @@ -78,7 +79,7 @@ dependencies {
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.2.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'

// Dagger 2
compile 'com.google.dagger:dagger:2.9'
Expand Down
Expand Up @@ -4,8 +4,8 @@

import dagger.Module;
import dagger.Provides;
import io.reactivex.Observable;
import retrofit2.http.Path;
import rx.Observable;
import vb.android.app.quality.rest.ApiInterface;
import vb.android.app.quality.rest.ResponseRank;

Expand Down
Expand Up @@ -16,9 +16,9 @@

package vb.android.app.quality.rest;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Path;
import rx.Observable;

/**
* Describe the REST API with which the app is communicating
Expand Down
13 changes: 9 additions & 4 deletions app/src/main/java/vb/android/app/quality/ui/MainActivity.java
Expand Up @@ -31,9 +31,10 @@

import butterknife.BindView;
import butterknife.ButterKnife;
import rx.Observer;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import vb.android.app.quality.InjectorHelper;
import vb.android.app.quality.R;
import vb.android.app.quality.pi.PiTask;
Expand Down Expand Up @@ -180,7 +181,7 @@ private void setState(State state) {
}

@Override
public void onCompleted() {
public void onComplete() {
setProgressBarIndeterminateVisibility(false);
}

Expand All @@ -190,6 +191,10 @@ public void onError(Throwable e) {
setState(State.IS_PI_COMPUTED);
}

@Override
public void onSubscribe(Disposable disposable) {
}

@Override
public void onNext(ResponseRank responseRank) {
setState(State.IS_RANK_READY);
Expand Down

0 comments on commit ab063c6

Please sign in to comment.