The question is, what do you prefer? - add magical...
# koin
a
The question is, what do you prefer? • add magically Activity/Fragment inside the
inject
• have a dedicated API for that:
injectActivity
or something else
w
Interesting idea. Do you have outlined the use cases which originated this feature? This could help to understand how is expected to consume something like this. Wondering if "magically" could lead in possible issues and being hard to understand what is happening and from where things come from. Another concern is maybe you don't want to expose
Activity
, but just a
Context
, Would you be able to support this case? If I would use this feature, I would go for a more explicit way of use which is clear when reading what is using, like the
injectActivity
suggestion.
e
I don’t think I have a need for this feature right now but generally I would prefer explicit/dedicated over magic.
☝️ 1
k
People will cause leaks more easily if you do this IMHO...
a
Yeah, my main purpose was to make allow to inject your Activity/Fragment like in Scopes, but more easily.
But finally I’mn thinking, this is the core use of “Scopes” and allowing reference your Activity/Fragment only in the scope guarantee that anything created around will be dropped