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 97474a025..75e145266 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 @@ -68,9 +68,15 @@ class PlayingQueueSheet : ExpandedBottomSheet() { PlayingQueue.repeatQueue = !PlayingQueue.repeatQueue it.alpha = if (PlayingQueue.repeatQueue) 1f else 0.5f } - binding.repeat.alpha = if (PlayingQueue.repeatQueue) 1f else 0.5f + binding.clearQueue.setOnClickListener { + val currentIndex = PlayingQueue.currentIndex() + PlayingQueue.setStreams(PlayingQueue.getStreams() + .filterIndexed { index, _ -> index == currentIndex }) + adapter.notifyDataSetChanged() + } + binding.bottomControls.setOnClickListener { dialog?.dismiss() } diff --git a/app/src/main/res/layout/queue_bottom_sheet.xml b/app/src/main/res/layout/queue_bottom_sheet.xml index 6f161266a..830779e10 100644 --- a/app/src/main/res/layout/queue_bottom_sheet.xml +++ b/app/src/main/res/layout/queue_bottom_sheet.xml @@ -55,14 +55,6 @@ android:padding="5dp" android:src="@drawable/ic_reverse" /> - - + + + +