mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-06 01:20:29 +05:30
Merge pull request #4356 from Bnyro/master
feat: control to clear entire playing queue
This commit is contained in:
commit
a487e12a79
@ -68,9 +68,15 @@ class PlayingQueueSheet : ExpandedBottomSheet() {
|
|||||||
PlayingQueue.repeatQueue = !PlayingQueue.repeatQueue
|
PlayingQueue.repeatQueue = !PlayingQueue.repeatQueue
|
||||||
it.alpha = if (PlayingQueue.repeatQueue) 1f else 0.5f
|
it.alpha = if (PlayingQueue.repeatQueue) 1f else 0.5f
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.repeat.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 {
|
binding.bottomControls.setOnClickListener {
|
||||||
dialog?.dismiss()
|
dialog?.dismiss()
|
||||||
}
|
}
|
||||||
|
@ -55,14 +55,6 @@
|
|||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:src="@drawable/ic_reverse" />
|
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
|
<ImageView
|
||||||
android:id="@+id/repeat"
|
android:id="@+id/repeat"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -81,6 +73,24 @@
|
|||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:src="@drawable/ic_playlist_add" />
|
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>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user