Merge pull request #5456 from Bnyro/master

fix: can't open channel from player fragment
This commit is contained in:
Bnyro 2024-01-06 21:19:25 +01:00 committed by GitHub
commit 7149578624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -653,7 +653,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
if (!this::streams.isInitialized) return@setOnClickListener
val activity = view?.context as MainActivity
activity.navController.navigate(NavDirections.openChannel(streams.uploaderUrl))
NavigationHelper.navigateChannel(requireContext(), streams.uploaderUrl)
activity.binding.mainMotionLayout.transitionToEnd()
binding.playerMotionLayout.transitionToEnd()
}

View File

@ -146,8 +146,7 @@ class PlaylistFragment : DynamicLayoutManagerFragment() {
binding.playlistInfo.text = getChannelAndVideoString(response, response.videos)
binding.playlistInfo.setOnClickListener {
(context as MainActivity).navController
.navigate(NavDirections.openChannel(response.uploaderUrl))
NavigationHelper.navigateChannel(requireContext(), response.uploaderUrl)
}
binding.playlistDescription.text = response.description?.parseAsHtml()