mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
feat: control to clear entire playing queue
This commit is contained in:
parent
05fa57b912
commit
1a78dd0475
@ -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()
|
||||
}
|
||||
|
@ -55,14 +55,6 @@
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_reverse" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/ic_arrow_down" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/repeat"
|
||||
android:layout_width="wrap_content"
|
||||
@ -81,6 +73,24 @@
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_playlist_add" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/clear_queue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_close" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/ic_arrow_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user