Skip to content

Instantly share code, notes, and snippets.

@dcow
Last active February 5, 2017 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcow/c5365aec81ca0dadf012c1ad5a847bdb to your computer and use it in GitHub Desktop.
Save dcow/c5365aec81ca0dadf012c1ad5a847bdb to your computer and use it in GitHub Desktop.
Flow 0.12 -> 1.0 migration guide
StateParceler -> KeyParceler
Flow.Dispatcher -> Dispatcher
flowDelegate.onNewIntent(Intent) -> Flow.onNewIntent(Intent, Activity)
flowDelegate.onResume()[other lifecycle] -> InternalLifecycleIntegration/InternalContextWrapper
Path -> "key" ... (not full story, keys are trivial now)
Flow.Traversal -> Traversal
Flow.TraversalCallback -> TraversalCallback
MortarScoper via FlowServicves
PathContainer -> KeyChanger
PathContinerView -> FlowContainerView (you make your own but get the key changing stuff out save for transition hooks to animate things)
Flow installation is prepped when the baseContext is attached (because it needs to wrap it) but installation only actually happens after the activity is created. Anything in onCreate that was flow related moves to onPostCreate.
-- All dependencies/scopes need to be available at the point that flow wrapps the base context instead of bootstrapped onCreate.
@Zhuinden
Copy link

Zhuinden commented Feb 5, 2017

Flow installation happens when the baseContext is attached.

The actual Flow installation happens when the Application:ActivityLifecycleCallbacks attaches the internal lifecycle integration fragment to the activity in onActivityCreated(), which means that the Flow instance only starts to exist after onCreate() but before onPostCreate().

@dcow
Copy link
Author

dcow commented Feb 5, 2017

Updated. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment