Add preference for managing swipe actions for Episodes list (#6072)
This commit is contained in:
parent
2f6fb3ffd5
commit
b122ad1c96
@ -5,6 +5,7 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
import de.danoeh.antennapod.activity.PreferenceActivity;
|
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||||
import de.danoeh.antennapod.dialog.SwipeActionsDialog;
|
import de.danoeh.antennapod.dialog.SwipeActionsDialog;
|
||||||
|
import de.danoeh.antennapod.fragment.AllEpisodesFragment;
|
||||||
import de.danoeh.antennapod.fragment.CompletedDownloadsFragment;
|
import de.danoeh.antennapod.fragment.CompletedDownloadsFragment;
|
||||||
import de.danoeh.antennapod.fragment.FeedItemlistFragment;
|
import de.danoeh.antennapod.fragment.FeedItemlistFragment;
|
||||||
import de.danoeh.antennapod.fragment.InboxFragment;
|
import de.danoeh.antennapod.fragment.InboxFragment;
|
||||||
@ -13,6 +14,7 @@ import de.danoeh.antennapod.fragment.QueueFragment;
|
|||||||
public class SwipePreferencesFragment extends PreferenceFragmentCompat {
|
public class SwipePreferencesFragment extends PreferenceFragmentCompat {
|
||||||
private static final String PREF_SWIPE_QUEUE = "prefSwipeQueue";
|
private static final String PREF_SWIPE_QUEUE = "prefSwipeQueue";
|
||||||
private static final String PREF_SWIPE_INBOX = "prefSwipeInbox";
|
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_DOWNLOADS = "prefSwipeDownloads";
|
||||||
private static final String PREF_SWIPE_FEED = "prefSwipeFeed";
|
private static final String PREF_SWIPE_FEED = "prefSwipeFeed";
|
||||||
|
|
||||||
@ -28,6 +30,10 @@ public class SwipePreferencesFragment extends PreferenceFragmentCompat {
|
|||||||
new SwipeActionsDialog(requireContext(), InboxFragment.TAG).show(() -> { });
|
new SwipeActionsDialog(requireContext(), InboxFragment.TAG).show(() -> { });
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
findPreference(PREF_SWIPE_EPISODES).setOnPreferenceClickListener(preference -> {
|
||||||
|
new SwipeActionsDialog(requireContext(), AllEpisodesFragment.TAG).show(() -> { });
|
||||||
|
return true;
|
||||||
|
});
|
||||||
findPreference(PREF_SWIPE_DOWNLOADS).setOnPreferenceClickListener(preference -> {
|
findPreference(PREF_SWIPE_DOWNLOADS).setOnPreferenceClickListener(preference -> {
|
||||||
new SwipeActionsDialog(requireContext(), CompletedDownloadsFragment.TAG).show(() -> { });
|
new SwipeActionsDialog(requireContext(), CompletedDownloadsFragment.TAG).show(() -> { });
|
||||||
return true;
|
return true;
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
android:key="prefSwipeInbox"
|
android:key="prefSwipeInbox"
|
||||||
android:title="@string/inbox_label"/>
|
android:title="@string/inbox_label"/>
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="prefSwipeEpisodes"
|
||||||
|
android:title="@string/episodes_label"/>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="prefSwipeDownloads"
|
android:key="prefSwipeDownloads"
|
||||||
android:title="@string/downloads_label"/>
|
android:title="@string/downloads_label"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user