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

Make the ResultWire injectable parameter of the BaseRouter class #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AndZp
Copy link

@AndZp AndZp commented Feb 3, 2022

The idea of PR - is to be able to inject the shared instance of ResultWire into separate Routers in order to send and receive the results across them.

I need this option to support complicated navigation cases in the multi-module project with bottom navigation where I need to keep several routers in parallel.

Since the constructor of the Router class has default implementation - the change is fully compatible with previous versions and should not break and library usage

@AndZp
Copy link
Author

AndZp commented Feb 7, 2022

This is how our case looks. From each of the tabs in the bottom nav, I would like to open LoginActivity and receive the results from it.
The idea is to have a shared instance of ResultWire and inject it into the Routers of each tab and the Login Activity. nav_case

@AndZp
Copy link
Author

AndZp commented Feb 7, 2022

Another option is to allow overriding of the methods setResultListener and sendResult. This will provide an option to implement this logic the way I want without having to use ResultWire at all

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.

1 participant