Skip to content

Commit

Permalink
Merge pull request #5328 from Bnyro/master
Browse files Browse the repository at this point in the history
fix: download sheet share dialog shares channel instead of video
  • Loading branch information
Bnyro authored Dec 14, 2023
2 parents 96c1c27 + 74e291c commit d725dc3
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand Down

0 comments on commit d725dc3

Please sign in to comment.