Skip to content

Commit

Permalink
Merge pull request #5402 from Bnyro/master
Browse files Browse the repository at this point in the history
fix: regressions by persistent notification lifecycle fix
  • Loading branch information
Bnyro committed Dec 30, 2023
2 parents 65f113c + 2e551c8 commit 98425bf
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
viewModel.isMiniPlayerVisible.value = false
// re-enable captions
updateCurrentSubtitle(currentSubtitle)
enableController()
binding.player.useController = true
commentsViewModel.setCommentSheetExpand(true)
mainMotionLayout.progress = 0F
changeOrientationMode()
Expand All @@ -468,7 +468,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
binding.playerMotionLayout
.addSwipeUpListener {
if (this::streams.isInitialized && PlayerHelper.fullscreenGesturesEnabled) {
disableController()
binding.player.hideController()
setFullscreen()
}
}
Expand Down Expand Up @@ -536,7 +536,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
// hide fullscreen button if autorotation enabled
playerBinding.fullscreen.setOnClickListener {
// hide player controller
disableController()
binding.player.hideController()
if (viewModel.isFullscreen.value == false) {
// go to fullscreen mode
setFullscreen()
Expand Down Expand Up @@ -1541,7 +1541,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {

openOrCloseFullscreenDialog(true)
} else {
enableController()
binding.player.useController = true

// close button got clicked in PiP mode
// pause the video and keep the app alive
Expand Down Expand Up @@ -1676,10 +1676,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
}
}

private fun enableController() {
binding.player.useController = true
}

private fun disableController() {
binding.player.useController = false
binding.player.hideController()
Expand Down

0 comments on commit 98425bf

Please sign in to comment.