mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #5328 from Bnyro/master
fix: download sheet share dialog shares channel instead of video
This commit is contained in:
commit
d725dc3070
@ -14,12 +14,8 @@ import com.github.libretube.services.OfflinePlayerService
|
|||||||
import com.github.libretube.ui.dialogs.ShareDialog
|
import com.github.libretube.ui.dialogs.ShareDialog
|
||||||
|
|
||||||
class DownloadOptionsBottomSheet : BaseBottomSheet() {
|
class DownloadOptionsBottomSheet : BaseBottomSheet() {
|
||||||
private lateinit var videoId: String
|
|
||||||
private lateinit var uploader: String
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
videoId = arguments?.getString(IntentData.videoId)!!
|
val videoId = arguments?.getString(IntentData.videoId)!!
|
||||||
uploader = arguments?.getString(IntentData.channelName)!!
|
|
||||||
|
|
||||||
val options = listOf(
|
val options = listOf(
|
||||||
R.string.playOnBackground,
|
R.string.playOnBackground,
|
||||||
@ -42,10 +38,10 @@ class DownloadOptionsBottomSheet : BaseBottomSheet() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
val shareData = ShareData(currentVideo = uploader)
|
val shareData = ShareData(currentVideo = videoId)
|
||||||
val bundle = bundleOf(
|
val bundle = bundleOf(
|
||||||
IntentData.id to videoId,
|
IntentData.id to videoId,
|
||||||
IntentData.shareObjectType to ShareObjectType.CHANNEL,
|
IntentData.shareObjectType to ShareObjectType.VIDEO,
|
||||||
IntentData.shareData to shareData
|
IntentData.shareData to shareData
|
||||||
)
|
)
|
||||||
val newShareDialog = ShareDialog()
|
val newShareDialog = ShareDialog()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user