diff options
author | ByteHamster <info@bytehamster.com> | 2021-03-06 21:44:35 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-03-07 10:52:26 +0100 |
commit | a3da79235a5965d830b164834cc95d3a1c762071 (patch) | |
tree | c33d8838f5e2b04295303c5d7a4aed11dd55e2cc /app/src | |
parent | dd0502c0d65ef51347a8dedabd6edf2b9318848c (diff) | |
download | AntennaPod-a3da79235a5965d830b164834cc95d3a1c762071.zip |
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 209bc62e5..05d73d848 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; } |