Fixed toolbar state updates
Do not modify up arrow state of background fragments's toolbars. They are invisible anyways and their state can be kept when resuming later.
This commit is contained in:
parent
8975b60ecd
commit
5f2b436ddc
|
@ -112,15 +112,6 @@ public class MainActivity extends CastEnabledActivity {
|
|||
setNavDrawerSize();
|
||||
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
fm.addOnBackStackChangedListener(() -> {
|
||||
boolean showArrow = fm.getBackStackEntryCount() != 0;
|
||||
if (drawerToggle != null) { // Tablet layout does not have a drawer
|
||||
drawerToggle.setDrawerIndicatorEnabled(!showArrow);
|
||||
} else if (getActionBar() != null) {
|
||||
getActionBar().setDisplayHomeAsUpEnabled(showArrow);
|
||||
}
|
||||
});
|
||||
|
||||
if (fm.findFragmentByTag(MAIN_FRAGMENT_TAG) == null) {
|
||||
String lastFragment = NavDrawerFragment.getLastNavFragment(this);
|
||||
if (ArrayUtils.contains(NavDrawerFragment.NAV_DRAWER_TAGS, lastFragment)) {
|
||||
|
|
|
@ -292,7 +292,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
|||
}
|
||||
EpisodesApplyActionFragment fragment = EpisodesApplyActionFragment
|
||||
.newInstance(feed.getItems(), actions);
|
||||
((MainActivity)getActivity()).loadChildFragment(fragment);
|
||||
((MainActivity) getActivity()).loadChildFragment(fragment);
|
||||
return true;
|
||||
case R.id.rename_item:
|
||||
new RenameFeedDialog(getActivity(), feed).show();
|
||||
|
|
|
@ -273,7 +273,8 @@ public class QueueFragment extends Fragment implements Toolbar.OnMenuItemClickLi
|
|||
return true;
|
||||
case R.id.episode_actions:
|
||||
((MainActivity) requireActivity()).loadChildFragment(
|
||||
EpisodesApplyActionFragment.newInstance(queue, ACTION_DELETE | ACTION_REMOVE_FROM_QUEUE | ACTION_DOWNLOAD));
|
||||
EpisodesApplyActionFragment.newInstance(queue,
|
||||
ACTION_DELETE | ACTION_REMOVE_FROM_QUEUE | ACTION_DOWNLOAD));
|
||||
return true;
|
||||
case R.id.queue_sort_episode_title_asc:
|
||||
setSortOrder(SortOrder.EPISODE_TITLE_A_Z);
|
||||
|
|
|
@ -154,7 +154,7 @@ public class SearchFragment extends Fragment {
|
|||
private void setupToolbar(Toolbar toolbar) {
|
||||
toolbar.setTitle(R.string.search_label);
|
||||
toolbar.setNavigationOnClickListener(v -> getParentFragmentManager().popBackStack());
|
||||
toolbar.inflateMenu(R.menu.gpodder_podcasts);
|
||||
toolbar.inflateMenu(R.menu.search);
|
||||
|
||||
MenuItem item = toolbar.getMenu().findItem(R.id.action_search);
|
||||
item.expandActionView();
|
||||
|
|
Loading…
Reference in New Issue