ragdroid/Dahaka

Scope question

SivarajSubramanian1 opened this issue · 1 comments

Great example, but is that correct to inject the activityInjector() from user manager in the application class.

@Override
    public AndroidInjector<Activity> activityInjector() {
        return userManager.activityInjector();
    }

In case of multiple sub components, should we not use the injector from the manager which built the component for that scoped activity. In this example login should have used the application component injector and the home activity could use the android injector from user manager.

Same question here,
It seems UserManager injector is always used, when initially injected it should pick the application one, after login it seems it switch to the user manager injector, but then when logout there is no switch to application again, so it seems the next Login Activity will be injected from User scope instead from application one.

I'm trying to start using this structure so It would be awesome having a response on this.

Thanks for awesome work! @ragdroid