Closed Zhuinden closed 7 years ago
Solution will be to keep preSaveViewState()
for doing things before onSaveInstanceState()
and will be a manual call, BUT also add onSaveInstanceState()
integration to InternalLifecycleIntegration
to automatically provide Bundleable
call through SingleRootDispatcher
.
https://github.com/Zhuinden/flowless/blob/master/flowless-library/src/main/java/flowless/ForceBundler.java#L12-L26
It is currently called from
preSaveViewState()
inSingleRootDispatcher
(beforesuper.onSaveInstanceState()
), but this callback can be missed by users ofSingleRootDispatcher
. Also, currentlytoBundle()
is used to create the bundle, and is mapped to the state directly.But what if we want nested dispatchers (multiple nested container dispatchers, for example) and we don't want to write event delegation logic (and just use an encapsulated single root dispatcher instead)?
Question is:
preSaveViewState()
manually