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

How to shadow parent services with nested scopes #189

Open
zoopolitic opened this issue Apr 6, 2016 · 0 comments
Open

How to shadow parent services with nested scopes #189

zoopolitic opened this issue Apr 6, 2016 · 0 comments

Comments

@zoopolitic
Copy link

You can also spawn your own shorter lived scopes to manage transient sessions, like the state of an object being built by a set of wizard screens.
These nested scopes can shadow the services provided by higher level scopes.

How this can be achieved? E.g. I have activity scope that provides dagger component and I want to spawn nested subscope(to provide subcomponent) that should shadow activity's dagger component. I'm using flow and I need to spawn subscope for several screens so the views of this screens will get subcomponent with Context.getSystemService instead of activity's component.

If I use buildChild() on acivity's scope then subscope will be just child of this scope, but it not shadows parent scope. Thanks.

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

No branches or pull requests

1 participant