Merge pull request #5732 from ByteHamster/remove-feed-popup

Fix side drawer detecting click on 'remove item'
This commit is contained in:
ByteHamster 2022-02-19 19:21:35 +01:00 committed by GitHub
commit de203c4a2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) { 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;

View File

@ -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;

View File

@ -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) {

View File

@ -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();

View File

@ -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"

View File

@ -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"/>