Hi guys, I’m using koin for di, I made mistake and...
# android-architecture
h
Hi guys, I’m using koin for di, I made mistake and put root activity’s viewmodel to activity scope and now viewmodel doesn’t get retained after rotation. The problem I needed to solve by putting viewmodel into activity scope is to allow child viewmodels inject root activity’s viewmodel. Is there way to do that and retain view model?
v
Have you considered using scopes?
h
As i mentioned i’m using activity scope.
v
Yeah what I thought is change the activity scope with a custom one.
h
The scope that i want to create practically is the scope of view model of the activity
is there any workaround to do that?