diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-03-07 11:18:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-07 11:18:36 +0100 |
commit | 9d2467a4e237608c192738357b659c13eff37379 (patch) | |
tree | 6f29aa3f81f3f1f55bdca3d338b64e45b9614bba /app/src | |
parent | 1ab732b8da73d2d5e873ceab20efb23dad4a4882 (diff) | |
parent | a3da79235a5965d830b164834cc95d3a1c762071 (diff) | |
download | AntennaPod-9d2467a4e237608c192738357b659c13eff37379.zip |
Merge pull request #4998 from ByteHamster/fix-navdrawer-pressed
Only react to onContextItemSelected if something was actually selected
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java index ee11f6bfe..6c4abadc1 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java @@ -134,8 +134,10 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS @Override public boolean onContextItemSelected(@NonNull MenuItem item) { - if (contextPressedItem.type == NavDrawerData.DrawerItem.Type.FEED) { - return onFeedContextMenuClicked(((NavDrawerData.FeedDrawerItem) contextPressedItem).feed, item); + NavDrawerData.DrawerItem pressedItem = contextPressedItem; + contextPressedItem = null; + if (pressedItem != null && pressedItem.type == NavDrawerData.DrawerItem.Type.FEED) { + return onFeedContextMenuClicked(((NavDrawerData.FeedDrawerItem) pressedItem).feed, item); } return false; } |