Commit 0b4a407b authored by Geoffrey Métais's avatar Geoffrey Métais

Properly pop backstack to browsers root level

parent 12b5dd1a
......@@ -649,17 +649,17 @@ public class MainActivity extends ContentActivity implements FilterQueryProvider
return false;
}
if(mCurrentFragmentId == id) { /* Already selected */
if (mCurrentFragmentId == id) { /* Already selected */
// Go back at root level of current browser
if (current instanceof BaseBrowserFragment && !((BaseBrowserFragment) current).isRootDirectory()) {
clearBackstackFromClass(current.getClass());
getSupportFragmentManager().popBackStack(getTag(id), FragmentManager.POP_BACK_STACK_INCLUSIVE);
} else {
mDrawerLayout.closeDrawer(mNavigationView);
return false;
}
}
switch (id){
switch (id) {
case R.id.nav_about:
showSecondaryFragment(SecondaryActivity.ABOUT);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment