From 2760257c26d3bbbb463d1ca906e8d2dee6482320 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 5 Nov 2022 20:22:59 +0100 Subject: [PATCH] disable modifying the already played queue items --- .../java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt index 69f575469..886ddf591 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt @@ -73,6 +73,9 @@ class PlayingQueueSheet : ExpandedBottomSheet() { val from = viewHolder.absoluteAdapterPosition val to = target.absoluteAdapterPosition + val currentPosition = PlayingQueue.currentIndex() + if (to <= currentPosition) return false + adapter.notifyItemMoved(from, to) PlayingQueue.move(from, to) return true