Add preference for managing swipe actions for Episodes list (#6072)

This commit is contained in:
Erik Johnson 2022-09-13 14:51:32 -05:00 committed by GitHub
parent 2f6fb3ffd5
commit b122ad1c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import androidx.preference.PreferenceFragmentCompat;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.dialog.SwipeActionsDialog;
import de.danoeh.antennapod.fragment.AllEpisodesFragment;
import de.danoeh.antennapod.fragment.CompletedDownloadsFragment;
import de.danoeh.antennapod.fragment.FeedItemlistFragment;
import de.danoeh.antennapod.fragment.InboxFragment;
@ -13,6 +14,7 @@ import de.danoeh.antennapod.fragment.QueueFragment;
public class SwipePreferencesFragment extends PreferenceFragmentCompat {
private static final String PREF_SWIPE_QUEUE = "prefSwipeQueue";
private static final String PREF_SWIPE_INBOX = "prefSwipeInbox";
private static final String PREF_SWIPE_EPISODES = "prefSwipeEpisodes";
private static final String PREF_SWIPE_DOWNLOADS = "prefSwipeDownloads";
private static final String PREF_SWIPE_FEED = "prefSwipeFeed";
@ -28,6 +30,10 @@ public class SwipePreferencesFragment extends PreferenceFragmentCompat {
new SwipeActionsDialog(requireContext(), InboxFragment.TAG).show(() -> { });
return true;
});
findPreference(PREF_SWIPE_EPISODES).setOnPreferenceClickListener(preference -> {
new SwipeActionsDialog(requireContext(), AllEpisodesFragment.TAG).show(() -> { });
return true;
});
findPreference(PREF_SWIPE_DOWNLOADS).setOnPreferenceClickListener(preference -> {
new SwipeActionsDialog(requireContext(), CompletedDownloadsFragment.TAG).show(() -> { });
return true;

View File

@ -9,6 +9,10 @@
android:key="prefSwipeInbox"
android:title="@string/inbox_label"/>
<Preference
android:key="prefSwipeEpisodes"
android:title="@string/episodes_label"/>
<Preference
android:key="prefSwipeDownloads"
android:title="@string/downloads_label"/>