mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
[Audio mode] Show video options when clicking thumbnail
This commit is contained in:
parent
a04fb31947
commit
cbbfa64f76
@ -25,6 +25,7 @@ import com.github.libretube.ui.base.BaseFragment
|
|||||||
import com.github.libretube.ui.dialogs.ShareDialog
|
import com.github.libretube.ui.dialogs.ShareDialog
|
||||||
import com.github.libretube.ui.sheets.PlaybackOptionsSheet
|
import com.github.libretube.ui.sheets.PlaybackOptionsSheet
|
||||||
import com.github.libretube.ui.sheets.PlayingQueueSheet
|
import com.github.libretube.ui.sheets.PlayingQueueSheet
|
||||||
|
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
|
||||||
import com.github.libretube.util.BackgroundHelper
|
import com.github.libretube.util.BackgroundHelper
|
||||||
import com.github.libretube.util.ImageHelper
|
import com.github.libretube.util.ImageHelper
|
||||||
import com.github.libretube.util.NavigationHelper
|
import com.github.libretube.util.NavigationHelper
|
||||||
@ -128,6 +129,14 @@ class AudioPlayerFragment : BaseFragment() {
|
|||||||
).show(childFragmentManager, null)
|
).show(childFragmentManager, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.thumbnail.setOnClickListener {
|
||||||
|
val current = PlayingQueue.getCurrent()
|
||||||
|
current?.let {
|
||||||
|
VideoOptionsBottomSheet(it.url!!.toID(), it.title!!)
|
||||||
|
.show(childFragmentManager)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Listen for track changes due to autoplay or the notification
|
// Listen for track changes due to autoplay or the notification
|
||||||
PlayingQueue.addOnTrackChangedListener(onTrackChangeListener)
|
PlayingQueue.addOnTrackChangedListener(onTrackChangeListener)
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import kotlinx.coroutines.launch
|
|||||||
*/
|
*/
|
||||||
class VideoOptionsBottomSheet(
|
class VideoOptionsBottomSheet(
|
||||||
private val videoId: String,
|
private val videoId: String,
|
||||||
private val videoName: String
|
videoName: String
|
||||||
) : BaseBottomSheet() {
|
) : BaseBottomSheet() {
|
||||||
private val shareData = ShareData(currentVideo = videoName)
|
private val shareData = ShareData(currentVideo = videoName)
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user