thomasnield
10/30/2016, 4:26 PMedvin
10/30/2016, 4:57 PMinject(DefaultScope)
, Scoped is inject()
and Prototype is inject()
for a Fragment 🙂edvin
10/30/2016, 5:01 PMcarlw
10/30/2016, 5:35 PMedvin
10/30/2016, 5:36 PMInjectable
in User
and it should just work.edvin
10/30/2016, 8:53 PMedvin
10/30/2016, 9:18 PMPrototype
interface and let Fragment and the controller counterpart implement those, and then rename Injectable
to be Singleton
or preferably something that can convey that it is a singleton within a scope. Scoped
is almost good enough, but one could argue that Prototype is also scoped. It support scopes and `inject()`s inside Fragments does indeed honor the surrounding scope.carlw
10/30/2016, 9:36 PMcarlw
10/30/2016, 9:37 PMPasted image at 2016-10-30, 5:37 PM▾
carlw
10/30/2016, 9:39 PMcarlw
10/30/2016, 9:39 PMedvin
10/30/2016, 9:39 PMcarlw
10/30/2016, 9:39 PMPasted image at 2016-10-30, 5:39 PM▾
edvin
10/30/2016, 9:40 PMcarlw
10/30/2016, 9:42 PMedvin
10/30/2016, 9:46 PMcarlw
10/30/2016, 9:51 PMcarlw
10/30/2016, 9:51 PMedvin
10/30/2016, 10:20 PMcarlw
10/30/2016, 10:21 PMedvin
10/30/2016, 10:21 PMedvin
10/30/2016, 10:21 PMedvin
10/31/2016, 7:32 AMedvin
10/31/2016, 7:33 AMedvin
10/31/2016, 7:57 AMedvin
10/31/2016, 9:35 AMComponent
so that you can easily override the scope type. This is super useful when you want to access a model or some other object inside your Scope subclass: override val scope = super.scope as MyScope
edvin
10/31/2016, 9:40 AMscope.model
. Maybe we should add a typed subclass of Scope called ModelScope
?edvin
10/31/2016, 9:43 AMopen class ItemModelScope<out M : I, out I : ItemViewModel<T>, T>(val model: M)
would be very helpful I think...carlw
10/31/2016, 10:00 AMdansvidania
10/31/2016, 10:11 AM