Merge pull request #4034 from Isira-Seneviratne/Fix_crash

Fix crash when opening comments
This commit is contained in:
Isira Seneviratne 2023-06-18 20:20:57 +05:30 committed by GitHub
commit df8c7e2842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
/** /**
* Video information passed by the intent * Video information passed by the intent
*/ */
private lateinit var playerData: PlayerData
private lateinit var videoId: String private lateinit var videoId: String
private var playlistId: String? = null private var playlistId: String? = null
private var channelId: String? = null private var channelId: String? = null
@ -395,7 +394,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
// set the max height to not cover the currently playing video // set the max height to not cover the currently playing video
commentsViewModel.handleLink = this::handleLink commentsViewModel.handleLink = this::handleLink
commentsViewModel.maxHeight = binding.root.height - binding.player.height commentsViewModel.maxHeight = binding.root.height - binding.player.height
commentsViewModel.videoId = playerData.videoId commentsViewModel.videoId = videoId
CommentsSheet().show(childFragmentManager) CommentsSheet().show(childFragmentManager)
} }