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

Add source parameter to the connection #66

Merged
merged 12 commits into from
May 9, 2019

Conversation

ShikaSD
Copy link
Contributor

@ShikaSD ShikaSD commented Feb 21, 2019

The Connection class we have right now is somehow limited for external observer (any middleware).
If you apply transformer, the only source the middleware will receive is ObservableFlatMap which is far from ideal.
This pull request tries to fix this issue, updating type signature to Connection<Out, In>, adding parameters for source and transformer and updating built-in middlewares to work with current implementation.
This PR does break backward compatibility for Connection usages, but I could not find any in our codebase, so I conclude it is not explicitly broadly used.

import com.badoo.mvicore.element.Reducer
import com.badoo.mvicore.element.WishToAction
import com.badoo.mvicore.consumer.wrapWithMiddleware
import com.badoo.mvicore.element.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wildcard import?

@zsoltk zsoltk merged commit 8cd6dc2 into badoo:master May 9, 2019
@ShikaSD ShikaSD mentioned this pull request Jun 24, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants