From 230bb388225dc8ff276e989d7a708da10442a059 Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Sun, 18 Jun 2023 19:40:02 +0530 Subject: [PATCH] Fix crash when opening comments --- .../java/com/github/libretube/ui/fragments/PlayerFragment.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index ff5327571..04956a30c 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -139,7 +139,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { /** * Video information passed by the intent */ - private lateinit var playerData: PlayerData private lateinit var videoId: String private var playlistId: 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 commentsViewModel.handleLink = this::handleLink commentsViewModel.maxHeight = binding.root.height - binding.player.height - commentsViewModel.videoId = playerData.videoId + commentsViewModel.videoId = videoId CommentsSheet().show(childFragmentManager) }