New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration RxJava 1 -> RxJava2 #56

Merged
merged 5 commits into from Feb 20, 2018

Conversation

Projects
None yet
4 participants
@Hiteshgautam01
Contributor

Hiteshgautam01 commented Feb 19, 2018

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the checks with ./gradlew check to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

@therajanmaurya

This comment has been minimized.

Show comment
Hide comment
@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Great work @Hiteshgautam01, Let me review.

Member

therajanmaurya commented Feb 19, 2018

Great work @Hiteshgautam01, Let me review.

// explicitly depend on RxJava's latest version for bug fixes and new features.
compile "io.reactivex:rxjava:1.1.5"
compile "io.reactivex.rxjava2:rxjava:2.0.1"
compile "io.reactivex.rxjava2:rxandroid:2.0.1"

This comment has been minimized.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Please make rxJavaVersion = 2.0.1 and rxAndroidVersion = 2.0.1 in project build.gradle and use here as we already using.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Please make rxJavaVersion = 2.0.1 and rxAndroidVersion = 2.0.1 in project build.gradle and use here as we already using.

@@ -46,23 +46,21 @@ public DBHelper() {
@Nullable
public Observable<Workflows> syncWorkflows(final Workflows workflows) {
return Observable.create(new Observable.OnSubscribe<Workflows>() {
return Observable.defer(new Callable<ObservableSource<? extends Workflows>>() {

This comment has been minimized.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Good work for using Observable.defer(...)

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Good work for using Observable.defer(...)

Show outdated Hide outdated ...rc/main/java/org/apache/taverna/mobile/data/local/PreferencesHelper.java
public AnnouncementPresenter(DataManager dataManager) {
mDataManager = dataManager;
mSubscriptions = new CompositeSubscription();
compositeDisposable = new CompositeDisposable();

This comment has been minimized.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Good work for using the CompositeDisposable, It has so many advantages that why we exceptionally lose subscription because of our logic.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Good work for using the CompositeDisposable, It has so many advantages that why we exceptionally lose subscription because of our logic.

Show outdated Hide outdated ...che/taverna/mobile/ui/favouriteworkflow/FavouriteWorkflowsPresenter.java
getMvpView().showWorkflow(workflow);
public void onComplete() {
getMvpView().showProgressbar(false);
getMvpView().checkWorkflowSize();

This comment has been minimized.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Move these two lines in onNext

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

Move these two lines in onNext

Show outdated Hide outdated .../java/org/apache/taverna/mobile/ui/playerlogin/PlayerLoginPresenter.java
Show outdated Hide outdated ...c/main/java/org/apache/taverna/mobile/ui/workflow/WorkflowPresenter.java
Show outdated Hide outdated .../java/org/apache/taverna/mobile/ui/workflowrun/WorkflowRunPresenter.java
private final Function<Callable<Scheduler>, Scheduler> mRxAndroidSchedulersHook =

This comment has been minimized.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

it's great you started working on Unit test too and thanks for fixing the previous test with Rxjava 2.

@therajanmaurya

therajanmaurya Feb 19, 2018

Member

it's great you started working on Unit test too and thanks for fixing the previous test with Rxjava 2.

@therajanmaurya

This comment has been minimized.

Show comment
Hide comment
@therajanmaurya

therajanmaurya Feb 19, 2018

Member

@Hiteshgautam01 Please make above changes rest of thing look good.

Member

therajanmaurya commented Feb 19, 2018

@Hiteshgautam01 Please make above changes rest of thing look good.

Show outdated Hide outdated ...c/main/java/org/apache/taverna/mobile/ui/workflow/WorkflowPresenter.java
@Override
public void onCompleted() {
public void onNext(Boolean b) {

This comment has been minimized.

@sagar15795

sagar15795 Feb 20, 2018

Member

This Boolean b name should be favoriteStatus

@sagar15795

sagar15795 Feb 20, 2018

Member

This Boolean b name should be favoriteStatus

@sagar15795

This comment has been minimized.

Show comment
Hide comment
@sagar15795

sagar15795 Feb 20, 2018

Member

@Hiteshgautam01
Please make the above changes and Let me know.

Member

sagar15795 commented Feb 20, 2018

@Hiteshgautam01
Please make the above changes and Let me know.

@Hiteshgautam01

This comment has been minimized.

Show comment
Hide comment
@Hiteshgautam01

Hiteshgautam01 Feb 20, 2018

Contributor

I have made the changes as per the review comments.
@therajanmaurya @sagar15795 Please review.

Contributor

Hiteshgautam01 commented Feb 20, 2018

I have made the changes as per the review comments.
@therajanmaurya @sagar15795 Please review.

@asfgit asfgit merged commit 55a8d96 into apache:master Feb 20, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

asfgit pushed a commit that referenced this pull request Feb 20, 2018

@sagar15795

This comment has been minimized.

Show comment
Hide comment
@sagar15795

sagar15795 Feb 20, 2018

Member

@Hiteshgautam01
Thanks for this migration

Member

sagar15795 commented Feb 20, 2018

@Hiteshgautam01
Thanks for this migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment