diff options
author | Taco <SkytkRSfan3895@gmail.com> | 2024-03-04 17:07:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 23:07:28 +0100 |
commit | 40da13e014a5b0c6e31b0234e31dac8c55473262 (patch) | |
tree | e3486b010b88415b83ae1c0467e3ce2890772fb6 /ui/common | |
parent | c06a3a6d27c61910e06041c70d9113a7ef4c4c5f (diff) | |
download | AntennaPod-40da13e014a5b0c6e31b0234e31dac8c55473262.zip |
Clean up some dead code (#6952)
Diffstat (limited to 'ui/common')
-rw-r--r-- | ui/common/src/main/java/de/danoeh/antennapod/ui/common/PagedToolbarFragment.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/PagedToolbarFragment.java b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/PagedToolbarFragment.java index 3d82cb32c..48793ff13 100644 --- a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/PagedToolbarFragment.java +++ b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/PagedToolbarFragment.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.ui.common; -import androidx.annotation.NonNull; import com.google.android.material.appbar.MaterialToolbar; import androidx.fragment.app.Fragment; import androidx.viewpager2.widget.ViewPager2; @@ -10,23 +9,8 @@ import androidx.viewpager2.widget.ViewPager2; * All items share the same general menu items and are just allowed to show/hide them. */ public abstract class PagedToolbarFragment extends Fragment { - private MaterialToolbar toolbar; - private ViewPager2 viewPager; - /** - * Invalidate the toolbar menu if the current child fragment is visible. - * @param child The fragment to invalidate - */ - public void invalidateOptionsMenuIfActive(@NonNull Fragment child) { - Fragment visibleChild = getChildFragmentManager().findFragmentByTag("f" + viewPager.getCurrentItem()); - if (visibleChild == child) { - visibleChild.onPrepareOptionsMenu(toolbar.getMenu()); - } - } - - protected void setupPagedToolbar(MaterialToolbar toolbar, ViewPager2 viewPager) { - this.toolbar = toolbar; - this.viewPager = viewPager; + protected void setupPagedToolbar(final MaterialToolbar toolbar, final ViewPager2 viewPager) { toolbar.setOnMenuItemClickListener(item -> { if (this.onOptionsItemSelected(item)) { |