You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quite often I don't want my apps to restore their last controller hierarchy after being killed on process death. Usually because I think the user wants to start fresh anyways and doesn't know where he left hours before.
I do this by calling Conductor.attachRouter(this, rootContainer, **null**) whenever I detect process death. Of course, instance state is saved anyways but I just ignore it on next start. So far so good.
Unfortunately, Conductor is not aware of this and still forces my controllers to have a default and a bundle constructor which I don't need/want in my case because my controllers do not need to be restored. The first enforcement is done by conductor-lint which I can luckily circumvent by having the two required constructors as protected in my BaseController. Okay.
The second and only thing left is that on creation of each controller ensureRequiredConstructor() is called at runtime and checks my controllers for these two constructors. If this method would be protected instead of private I could also override it in my BaseController which is aware of how I "configured" conductor and therefore can prevent these checks.
Is there any chance that ensureRequiredConstructor() can be changed to "protected"?
Or do you even plan to provide other options to configure conductor the way I want?
The text was updated successfully, but these errors were encountered:
Quite often I don't want my apps to restore their last controller hierarchy after being killed on process death. Usually because I think the user wants to start fresh anyways and doesn't know where he left hours before.
I do this by calling
Conductor.attachRouter(this, rootContainer, **null**)
whenever I detect process death. Of course, instance state is saved anyways but I just ignore it on next start. So far so good.Unfortunately, Conductor is not aware of this and still forces my controllers to have a default and a bundle constructor which I don't need/want in my case because my controllers do not need to be restored. The first enforcement is done by conductor-lint which I can luckily circumvent by having the two required constructors as protected in my BaseController. Okay.
The second and only thing left is that on creation of each controller
ensureRequiredConstructor()
is called at runtime and checks my controllers for these two constructors. If this method would be protected instead of private I could also override it in my BaseController which is aware of how I "configured" conductor and therefore can prevent these checks.Is there any chance that ensureRequiredConstructor() can be changed to "protected"?
Or do you even plan to provide other options to configure conductor the way I want?
The text was updated successfully, but these errors were encountered: