From f05984d2536d1606db3bd456e85eec947dc4cad8 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 27 Nov 2015 22:44:27 +0100 Subject: [PATCH] *EpisodesFragment: Fix context menu sharing --- .../de/danoeh/antennapod/fragment/AllEpisodesFragment.java | 4 ++++ .../java/de/danoeh/antennapod/fragment/QueueFragment.java | 1 + 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java index 23b5be25a..37be8f020 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java @@ -261,9 +261,13 @@ public class AllEpisodesFragment extends Fragment { @Override public boolean onContextItemSelected(MenuItem item) { + Log.d(TAG, "onContextItemSelected() called with: " + "item = [" + item + "]"); if(!isVisible()) { return false; } + if(item.getItemId() == R.id.share_item) { + return true; // avoids that the position is reset when we need it in the submenu + } int pos = listAdapter.getPosition(); if(pos < 0) { return false; diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index e13fd76b3..caf23df9a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -320,6 +320,7 @@ public class QueueFragment extends Fragment { @Override public boolean onContextItemSelected(MenuItem item) { + Log.d(TAG, "onContextItemSelected() called with: " + "item = [" + item + "]"); if(!isVisible()) { return false; }