From 74e291c1ddc51544184a436139f7ddab461c2d82 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 14 Dec 2023 18:48:10 +0100 Subject: [PATCH] fix: download sheet share dialog shares channel instead of video --- .../libretube/ui/sheets/DownloadOptionsBottomSheet.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/sheets/DownloadOptionsBottomSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/DownloadOptionsBottomSheet.kt index e65a933d3..71ad7e596 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/DownloadOptionsBottomSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/DownloadOptionsBottomSheet.kt @@ -14,12 +14,8 @@ import com.github.libretube.services.OfflinePlayerService import com.github.libretube.ui.dialogs.ShareDialog class DownloadOptionsBottomSheet : BaseBottomSheet() { - private lateinit var videoId: String - private lateinit var uploader: String - override fun onCreate(savedInstanceState: Bundle?) { - videoId = arguments?.getString(IntentData.videoId)!! - uploader = arguments?.getString(IntentData.channelName)!! + val videoId = arguments?.getString(IntentData.videoId)!! val options = listOf( R.string.playOnBackground, @@ -42,10 +38,10 @@ class DownloadOptionsBottomSheet : BaseBottomSheet() { } 2 -> { - val shareData = ShareData(currentVideo = uploader) + val shareData = ShareData(currentVideo = videoId) val bundle = bundleOf( IntentData.id to videoId, - IntentData.shareObjectType to ShareObjectType.CHANNEL, + IntentData.shareObjectType to ShareObjectType.VIDEO, IntentData.shareData to shareData ) val newShareDialog = ShareDialog()