flow
flow copied to clipboard
No reason for setDispatcher(), setHistoryFilter() to be public
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.
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.