summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/adapter
diff options
context:
space:
mode:
authorpeakvalleytech <65185819+peakvalleytech@users.noreply.github.com>2021-07-10 00:11:41 -0700
committerGitHub <noreply@github.com>2021-07-10 09:11:41 +0200
commit00bf2db0a454e5c0d6bbe62d468f97a6f8056127 (patch)
tree6ec497cb1cc660ab5c2e57f0739c8ad79d8eafab /app/src/main/java/de/danoeh/antennapod/adapter
parent323f1f61424c39f8cde6076a4d30501bc75fc109 (diff)
downloadAntennaPod-00bf2db0a454e5c0d6bbe62d468f97a6f8056127.zip
Replace old episode multi-select with new multi-select. (#5253)
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
index 117ba3258..0e238eae2 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
@@ -44,7 +44,7 @@ public class QueueRecyclerAdapter extends EpisodeItemListAdapter {
return false;
};
- if (!dragDropEnabled) {
+ if (!dragDropEnabled || inActionMode()) {
holder.dragHandle.setVisibility(View.GONE);
holder.dragHandle.setOnTouchListener(null);
holder.coverHolder.setOnTouchListener(null);
@@ -63,11 +63,17 @@ public class QueueRecyclerAdapter extends EpisodeItemListAdapter {
inflater.inflate(R.menu.queue_context, menu);
super.onCreateContextMenu(menu, v, menuInfo);
- final boolean keepSorted = UserPreferences.isQueueKeepSorted();
- if (getItem(0).getId() == getLongPressedItem().getId() || keepSorted) {
+ if (!inActionMode()) {
+ menu.findItem(R.id.multi_select).setVisible(true);
+ final boolean keepSorted = UserPreferences.isQueueKeepSorted();
+ if (getItem(0).getId() == getLongPressedItem().getId() || keepSorted) {
+ menu.findItem(R.id.move_to_top_item).setVisible(false);
+ }
+ if (getItem(getItemCount() - 1).getId() == getLongPressedItem().getId() || keepSorted) {
+ menu.findItem(R.id.move_to_bottom_item).setVisible(false);
+ }
+ } else {
menu.findItem(R.id.move_to_top_item).setVisible(false);
- }
- if (getItem(getItemCount() - 1).getId() == getLongPressedItem().getId() || keepSorted) {
menu.findItem(R.id.move_to_bottom_item).setVisible(false);
}
}