Skip to content
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

feat: Add chaining RxJava #2117

Merged

Conversation

@anhanh11001
Copy link
Contributor

anhanh11001 commented Jul 14, 2019

Details:

  • Add chaining RxJava on loading order details, signing up, editting user profile
  • Remove unused methods

Fixes: #2116

@auto-label auto-label bot added the feature label Jul 14, 2019
else
authService.uploadImage(UploadImage(encodedImage)).flatMap {
authService.updateUser(User(id = id, firstName = firstName, lastName = lastName,
avatarUrl = it.url, details = details), id)

This comment has been minimized.

Copy link
@iamareebjamal

iamareebjamal Jul 14, 2019

Member

Repetition, please use data class copy constructor

val signUpObservable: Single<User> = authService.signUp(signUp).flatMap {
email = signUp.email
password = signUp.password
authService.login(email.nullToEmpty(), password.nullToEmpty()).flatMap {

This comment has been minimized.

Copy link
@iamareebjamal

iamareebjamal Jul 14, 2019

Member

Chaining should not be nested

This comment has been minimized.

Copy link
@iamareebjamal

iamareebjamal Jul 17, 2019

Member

Still not resolved. Chaining should not be nested. That's the point of chaining

@anhanh11001 anhanh11001 force-pushed the anhanh11001:2116_chaining_rx_java branch from ad85ca5 to ef016d5 Jul 15, 2019
@anhanh11001 anhanh11001 requested a review from liveHarshit Jul 15, 2019
Copy link
Member

iamareebjamal left a comment

Remove obsolete variables

@anhanh11001 anhanh11001 force-pushed the anhanh11001:2116_chaining_rx_java branch 2 times, most recently from c947812 to b037a3d Jul 16, 2019
@anhanh11001 anhanh11001 requested a review from liveHarshit Jul 16, 2019
@liveHarshit liveHarshit requested a review from iamareebjamal Jul 17, 2019
val signUpObservable: Single<User> = authService.signUp(signUp).flatMap {
email = signUp.email
password = signUp.password
authService.login(email.nullToEmpty(), password.nullToEmpty()).flatMap {

This comment has been minimized.

Copy link
@iamareebjamal

iamareebjamal Jul 17, 2019

Member

Still not resolved. Chaining should not be nested. That's the point of chaining

@anhanh11001 anhanh11001 force-pushed the anhanh11001:2116_chaining_rx_java branch 4 times, most recently from 58776fd to 33026cc Jul 17, 2019
@anhanh11001 anhanh11001 requested a review from nikit19 Jul 25, 2019
Fixes: #2116
@anhanh11001 anhanh11001 force-pushed the anhanh11001:2116_chaining_rx_java branch from 33026cc to 0b1b89a Jul 26, 2019
@anhanh11001

This comment has been minimized.

Copy link
Contributor Author

anhanh11001 commented Jul 26, 2019

@iamareebjamal, please review

@iamareebjamal iamareebjamal merged commit 573e2ca into fossasia:development Jul 26, 2019
4 checks passed
4 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Mergeable Mergeable Run has been Completed!
Details
Semantic Pull Request ready to be squashed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@anhanh11001 anhanh11001 deleted the anhanh11001:2116_chaining_rx_java branch Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.