Fixed proper navigation.

master
Tomasz Półgrabia 2016-09-18 17:21:33 +02:00
parent 4d68d7fce3
commit a9af2c2015
1 changed files with 6 additions and 4 deletions

View File

@ -208,7 +208,9 @@ public class MainActivity extends ActionBarActivity {
} else {
ctx.replace(R.id.fragments, panoramioShower, PanoramioShowerFragment.TAG);
}
ctx.addToBackStack(PHOTO_BACKSTACK);
if (!savedConfiguration) {
ctx.addToBackStack(PHOTO_BACKSTACK);
}
ctx.commit();
@ -220,8 +222,6 @@ public class MainActivity extends ActionBarActivity {
photoInfo = null;
}
savedConfiguration = false;
if (photoInfo != null) {
switchToPhoto(photoInfo);
return;
@ -241,6 +241,8 @@ public class MainActivity extends ActionBarActivity {
break;
}
savedConfiguration = false;
}
private void switchFragment(Fragment fragment, String tag) {
@ -274,7 +276,7 @@ public class MainActivity extends ActionBarActivity {
} else {
ctx.replace(R.id.fragments, frag);
}
ctx.addToBackStack(MAIN_BACKSTACK);
// ctx.addToBackStack(MAIN_BACKSTACK);
ctx.commit();
updateSwipeHandler();
}