-
Notifications
You must be signed in to change notification settings - Fork 551
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
feat: Add chaining RxJava #2117
Conversation
else | ||
authService.uploadImage(UploadImage(encodedImage)).flatMap { | ||
authService.updateUser(User(id = id, firstName = firstName, lastName = lastName, | ||
avatarUrl = it.url, details = details), id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chaining should not be nested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not resolved. Chaining should not be nested. That's the point of chaining
app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/fossasia/openevent/general/auth/SignUpViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewModel.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove obsolete variables
val signUpObservable: Single<User> = authService.signUp(signUp).flatMap { | ||
email = signUp.email | ||
password = signUp.password | ||
authService.login(email.nullToEmpty(), password.nullToEmpty()).flatMap { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not resolved. Chaining should not be nested. That's the point of chaining
@iamareebjamal, please review |
Details:
Fixes: #2116