square / flow

Name UI states, navigate between them, remember where you've been.
Apache License 2.0
2.79k stars 241 forks source link

No reason for setDispatcher(), setHistoryFilter() to be public #253

Open rjrjr opened 7 years ago

rjrjr commented 7 years ago

It’s odd that Flow#setDispatcher() is still public, since it can be provided via the flow.Installer. setHistoryFilter() should move to the installer as well.

dcow commented 7 years ago

What if you want to change dispatchers or filters based on runtime conditions? This change would be more tenable if you installed in onCreate where your activity is actually alive. Currently the only option to set a dynamic dispatcher is to use some default when you install and very quickly update in onCreate. Or, of course you can update references on some shim dispatcher, but that means your dispatcher has to have mutable properties which is no fun.