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 possibility to get dependency from Android Component #78

Closed
wants to merge 1 commit into from
Closed

Add possibility to get dependency from Android Component #78

wants to merge 1 commit into from

Conversation

kirich1409
Copy link
Contributor

Add possibility to get dependency from Android Components without inject it

@arnaudgiuliani
Copy link
Member

Hello,

you mean to have the get() eager injection function into Android components.

I push the semantic on the by inject() style lazy properties declaration. But why not unlock the get() function. But I think that most cases can be declared with lazy property injection. The get() function should be used to inject a dependency on a local/short function.

@kirich1409
Copy link
Contributor Author

In some case i need dependency to only execute single operation and no need a property. Simple case from Android: main Activity of app check state from preference (that is dependency in Koin) and after this start another screen based on preference value.

@kirich1409
Copy link
Contributor Author

This possibility is analogue of method injection from Dagger 2.

@arnaudgiuliani
Copy link
Member

Ok

@arnaudgiuliani arnaudgiuliani changed the base branch from master to 0.9.1 March 12, 2018 16:56
@arnaudgiuliani
Copy link
Member

Please check conflicts

@arnaudgiuliani
Copy link
Member

I already added the fix - 789c95f

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.

2 participants