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
wbertan
11/22/2021, 6:07 PM
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
eurycea
11/22/2021, 6:09 PM
I don’t think I have a need for this feature right now but generally I would prefer explicit/dedicated over magic.
☝️ 1
k
kenkyee
11/22/2021, 8:26 PM
People will cause leaks more easily if you do this IMHO...
a
arnaud.giuliani
11/24/2021, 8:20 AM
Yeah, my main purpose was to make allow to inject your Activity/Fragment like in Scopes, but more easily.
arnaud.giuliani
11/24/2021, 8:20 AM
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