mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-30 06:43:00 +00:00 
			
		
		
		
	Merge branch 'dev' into auto_queue_logic
This commit is contained in:
		| @@ -900,6 +900,11 @@ public final class MainVideoPlayer extends AppCompatActivity | |||||||
|                 public void onMove(int sourceIndex, int targetIndex) { |                 public void onMove(int sourceIndex, int targetIndex) { | ||||||
|                     if (playQueue != null) playQueue.move(sourceIndex, targetIndex); |                     if (playQueue != null) playQueue.move(sourceIndex, targetIndex); | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  |                 @Override | ||||||
|  |                 public void onSwiped(int index) { | ||||||
|  |                     if(index != -1) playQueue.remove(index); | ||||||
|  |                 } | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -375,6 +375,11 @@ public abstract class ServicePlayerActivity extends AppCompatActivity | |||||||
|             public void onMove(int sourceIndex, int targetIndex) { |             public void onMove(int sourceIndex, int targetIndex) { | ||||||
|                 if (player != null) player.getPlayQueue().move(sourceIndex, targetIndex); |                 if (player != null) player.getPlayQueue().move(sourceIndex, targetIndex); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             @Override | ||||||
|  |             public void onSwiped(int index) { | ||||||
|  |                 if (index != -1) player.getPlayQueue().remove(index); | ||||||
|  |             } | ||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,11 +8,13 @@ public abstract class PlayQueueItemTouchCallback extends ItemTouchHelper.SimpleC | |||||||
|     private static final int MAXIMUM_INITIAL_DRAG_VELOCITY = 25; |     private static final int MAXIMUM_INITIAL_DRAG_VELOCITY = 25; | ||||||
|  |  | ||||||
|     public PlayQueueItemTouchCallback() { |     public PlayQueueItemTouchCallback() { | ||||||
|         super(ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0); |         super(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.RIGHT); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public abstract void onMove(final int sourceIndex, final int targetIndex); |     public abstract void onMove(final int sourceIndex, final int targetIndex); | ||||||
|  |  | ||||||
|  |     public abstract void onSwiped(int index); | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public int interpolateOutOfBoundsScroll(RecyclerView recyclerView, int viewSize, |     public int interpolateOutOfBoundsScroll(RecyclerView recyclerView, int viewSize, | ||||||
|                                             int viewSizeOutOfBounds, int totalSize, |                                             int viewSizeOutOfBounds, int totalSize, | ||||||
| @@ -44,9 +46,11 @@ public abstract class PlayQueueItemTouchCallback extends ItemTouchHelper.SimpleC | |||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public boolean isItemViewSwipeEnabled() { |     public boolean isItemViewSwipeEnabled() { | ||||||
|         return false; |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {} |     public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) { | ||||||
|  |         onSwiped(viewHolder.getAdapterPosition()); | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Shivanju Awasthi
					Shivanju Awasthi