I looked at the Custom Scopes in dagger 2 ( the this and it is those that I try to create in my code), and there is one thing that I still can not understand, I see that you can create a component with a custom domain, and then everything provides that the modules contained in this component will be either the same scope as the component (a single element in the component), or not the scope that will return new instances each time you receive them.
But what I still donβt get is if you have a user area, and then you have some modules attached to this area, let's say that your network component is attached to it, so that the use of network calls is the current user information, if you log out of the user account (or log in to the user system) in the middle of the activity life cycle, will it change the links to the objects that you currently marked as @Inject? or some other instance that you received when calling .inject (this) in the onCreate method. Or should you call the injection again to display the links again?
Any help on this is much appreciated :)
source
share