diff --git a/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt index 18b2c124fa..40512ce0c2 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt @@ -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) diff --git a/app/src/main/java/com/github/libretube/ui/sheets/VideoOptionsBottomSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/VideoOptionsBottomSheet.kt index 354df30bbf..fb75cf3257 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/VideoOptionsBottomSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/VideoOptionsBottomSheet.kt @@ -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?) {