Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
fix state restoration
Browse files Browse the repository at this point in the history
We were getting a new fragment instance to replace our old fragment
instance, but it needed to be reconfigured.
  • Loading branch information
loganj committed Feb 11, 2016
1 parent 995c63f commit 8a48117
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flow/src/main/java/flow/InternalLifecycleIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ static void install(Application app, final Activity activity,
@Override public void onActivityCreated(Activity a, Bundle savedInstanceState) {
if (a == activity) {
InternalLifecycleIntegration fragment = find(activity);
final boolean newFragment = fragment == null;
boolean newFragment = fragment == null;
if (newFragment) {
fragment = new InternalLifecycleIntegration();
}
if (fragment.keyManager == null) {
fragment.defaultHistory = defaultHistory;
fragment.parceler = parceler;
fragment.keyManager = keyManager;
Expand Down

0 comments on commit 8a48117

Please sign in to comment.