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:
ByteHamster 2022-02-19 14:13:57 +01:00
parent f4c90885d7
commit eb16c794fc
6 changed files with 6 additions and 6 deletions

View File

@ -310,7 +310,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
if (itemId == R.id.rename_item) {
new RenameItemDialog(getActivity(), feed).show();
return true;
} else if (itemId == R.id.remove_item) {
} else if (itemId == R.id.remove_feed) {
((MainActivity) getActivity()).loadFragment(EpisodesFragment.TAG, null);
RemoveFeedDialog.show(getContext(), feed);
return true;

View File

@ -169,7 +169,7 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS
} else if (itemId == R.id.rename_item) {
new RenameItemDialog(getActivity(), feed).show();
return true;
} else if (itemId == R.id.remove_item) {
} else if (itemId == R.id.remove_feed) {
((MainActivity) getActivity()).loadFragment(EpisodesFragment.TAG, null);
RemoveFeedDialog.show(getContext(), feed);
return true;

View File

@ -357,7 +357,7 @@ public class SubscriptionFragment extends Fragment
} else if (itemId == R.id.rename_item) {
new RenameItemDialog(getActivity(), feed).show();
return true;
} else if (itemId == R.id.remove_item) {
} else if (itemId == R.id.remove_feed) {
RemoveFeedDialog.show(getContext(), feed);
return true;
} else if (itemId == R.id.multi_select) {

View File

@ -36,7 +36,7 @@ public class FeedMultiSelectActionHandler {
}
public void handleAction(int id) {
if (id == R.id.remove_item) {
if (id == R.id.remove_feed) {
RemoveFeedDialog.show(activity, selectedItems);
} else if (id == R.id.keep_updated) {
keepUpdatedPrefHandler();

View File

@ -70,7 +70,7 @@
custom:showAsAction="never" />
<item
android:id="@+id/remove_item"
android:id="@+id/remove_feed"
android:icon="@drawable/ic_delete"
android:menuCategory="container"
android:title="@string/remove_feed_label"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/remove_item"
android:id="@+id/remove_feed"
android:menuCategory="container"
android:title="@string/remove_feed_label"
android:icon="@drawable/ic_delete"/>