Merge pull request #3286 from ByteHamster/batch-edit-queue
Added batch edit to queue
This commit is contained in:
commit
60866a1c79
|
@ -47,7 +47,7 @@ public class EpisodesApplyActionFragment extends Fragment {
|
|||
public static final String TAG = "EpisodeActionFragment";
|
||||
|
||||
public static final int ACTION_ADD_TO_QUEUE = 1;
|
||||
private static final int ACTION_REMOVE_FROM_QUEUE = 2;
|
||||
public static final int ACTION_REMOVE_FROM_QUEUE = 2;
|
||||
private static final int ACTION_MARK_PLAYED = 4;
|
||||
private static final int ACTION_MARK_UNPLAYED = 8;
|
||||
private static final int ACTION_DOWNLOAD = 16;
|
||||
|
|
|
@ -49,6 +49,7 @@ import de.danoeh.antennapod.core.util.Converter;
|
|||
import de.danoeh.antennapod.core.util.FeedItemUtil;
|
||||
import de.danoeh.antennapod.core.util.LongList;
|
||||
import de.danoeh.antennapod.core.util.QueueSorter;
|
||||
import de.danoeh.antennapod.dialog.EpisodesApplyActionFragment;
|
||||
import de.danoeh.antennapod.menuhandler.FeedItemMenuHandler;
|
||||
import de.danoeh.antennapod.menuhandler.MenuItemUtils;
|
||||
|
||||
|
@ -61,6 +62,9 @@ import org.greenrobot.eventbus.EventBus;
|
|||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import static de.danoeh.antennapod.dialog.EpisodesApplyActionFragment.ACTION_DELETE;
|
||||
import static de.danoeh.antennapod.dialog.EpisodesApplyActionFragment.ACTION_REMOVE_FROM_QUEUE;
|
||||
|
||||
/**
|
||||
* Shows all items in the queue
|
||||
*/
|
||||
|
@ -316,6 +320,10 @@ public class QueueFragment extends Fragment {
|
|||
};
|
||||
conDialog.createNewDialog().show();
|
||||
return true;
|
||||
case R.id.episode_actions:
|
||||
((MainActivity) requireActivity()) .loadChildFragment(
|
||||
EpisodesApplyActionFragment.newInstance(queue, ACTION_DELETE | ACTION_REMOVE_FROM_QUEUE));
|
||||
return true;
|
||||
case R.id.queue_sort_episode_title_asc:
|
||||
QueueSorter.sort(getActivity(), QueueSorter.Rule.EPISODE_TITLE_ASC, true);
|
||||
return true;
|
||||
|
|
|
@ -23,13 +23,6 @@
|
|||
custom:actionViewClass="android.support.v7.widget.SearchView"
|
||||
android:title="@string/search_label"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/clear_queue"
|
||||
android:title="@string/clear_queue_label"
|
||||
android:menuCategory="container"
|
||||
custom:showAsAction="collapseActionView"
|
||||
android:icon="?attr/navigation_accept"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/queue_sort"
|
||||
android:title="@string/sort">
|
||||
|
@ -112,4 +105,15 @@
|
|||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/clear_queue"
|
||||
android:title="@string/clear_queue_label"
|
||||
custom:showAsAction="collapseActionView"
|
||||
android:icon="?attr/navigation_accept"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/episode_actions"
|
||||
custom:showAsAction="collapseActionView"
|
||||
android:title="@string/batch_edit" />
|
||||
|
||||
</menu>
|
||||
|
|
Loading…
Reference in New Issue