mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30:31 +05:30
Merge pull request #2830 from Bnyro/master
[Audio mode] Show video options when clicking thumbnail
This commit is contained in:
commit
7884edc88f
@ -25,6 +25,7 @@ import com.github.libretube.ui.base.BaseFragment
|
||||
import com.github.libretube.ui.dialogs.ShareDialog
|
||||
import com.github.libretube.ui.sheets.PlaybackOptionsSheet
|
||||
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.ImageHelper
|
||||
import com.github.libretube.util.NavigationHelper
|
||||
@ -128,6 +129,14 @@ class AudioPlayerFragment : BaseFragment() {
|
||||
).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
|
||||
PlayingQueue.addOnTrackChangedListener(onTrackChangeListener)
|
||||
|
||||
|
@ -22,7 +22,7 @@ import kotlinx.coroutines.launch
|
||||
*/
|
||||
class VideoOptionsBottomSheet(
|
||||
private val videoId: String,
|
||||
private val videoName: String
|
||||
videoName: String
|
||||
) : BaseBottomSheet() {
|
||||
private val shareData = ShareData(currentVideo = videoName)
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user