Fix side drawer detecting click on 'remove item'
remove_item referred to both, feeds and media files. Sometimes the wrong fragment receives the context menu click event.
This commit is contained in:
parent
f4c90885d7
commit
eb16c794fc
|
@ -310,7 +310,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||||
if (itemId == R.id.rename_item) {
|
if (itemId == R.id.rename_item) {
|
||||||
new RenameItemDialog(getActivity(), feed).show();
|
new RenameItemDialog(getActivity(), feed).show();
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.remove_item) {
|
} else if (itemId == R.id.remove_feed) {
|
||||||
((MainActivity) getActivity()).loadFragment(EpisodesFragment.TAG, null);
|
((MainActivity) getActivity()).loadFragment(EpisodesFragment.TAG, null);
|
||||||
RemoveFeedDialog.show(getContext(), feed);
|
RemoveFeedDialog.show(getContext(), feed);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS
|
||||||
} else if (itemId == R.id.rename_item) {
|
} else if (itemId == R.id.rename_item) {
|
||||||
new RenameItemDialog(getActivity(), feed).show();
|
new RenameItemDialog(getActivity(), feed).show();
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.remove_item) {
|
} else if (itemId == R.id.remove_feed) {
|
||||||
((MainActivity) getActivity()).loadFragment(EpisodesFragment.TAG, null);
|
((MainActivity) getActivity()).loadFragment(EpisodesFragment.TAG, null);
|
||||||
RemoveFeedDialog.show(getContext(), feed);
|
RemoveFeedDialog.show(getContext(), feed);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -357,7 +357,7 @@ public class SubscriptionFragment extends Fragment
|
||||||
} else if (itemId == R.id.rename_item) {
|
} else if (itemId == R.id.rename_item) {
|
||||||
new RenameItemDialog(getActivity(), feed).show();
|
new RenameItemDialog(getActivity(), feed).show();
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.remove_item) {
|
} else if (itemId == R.id.remove_feed) {
|
||||||
RemoveFeedDialog.show(getContext(), feed);
|
RemoveFeedDialog.show(getContext(), feed);
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.id.multi_select) {
|
} else if (itemId == R.id.multi_select) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class FeedMultiSelectActionHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleAction(int id) {
|
public void handleAction(int id) {
|
||||||
if (id == R.id.remove_item) {
|
if (id == R.id.remove_feed) {
|
||||||
RemoveFeedDialog.show(activity, selectedItems);
|
RemoveFeedDialog.show(activity, selectedItems);
|
||||||
} else if (id == R.id.keep_updated) {
|
} else if (id == R.id.keep_updated) {
|
||||||
keepUpdatedPrefHandler();
|
keepUpdatedPrefHandler();
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
custom:showAsAction="never" />
|
custom:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/remove_item"
|
android:id="@+id/remove_feed"
|
||||||
android:icon="@drawable/ic_delete"
|
android:icon="@drawable/ic_delete"
|
||||||
android:menuCategory="container"
|
android:menuCategory="container"
|
||||||
android:title="@string/remove_feed_label"
|
android:title="@string/remove_feed_label"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/remove_item"
|
android:id="@+id/remove_feed"
|
||||||
android:menuCategory="container"
|
android:menuCategory="container"
|
||||||
android:title="@string/remove_feed_label"
|
android:title="@string/remove_feed_label"
|
||||||
android:icon="@drawable/ic_delete"/>
|
android:icon="@drawable/ic_delete"/>
|
||||||
|
|
Loading…
Reference in New Issue