This commit is contained in:
Bnyro 2022-08-13 19:08:39 +02:00
parent da8bfe6327
commit d2bc2d23b5

View File

@ -165,6 +165,7 @@ class PlayerFragment : BaseFragment() {
private var sponsorBlockEnabled = true private var sponsorBlockEnabled = true
private var sponsorBlockNotifications = true private var sponsorBlockNotifications = true
private var skipButtonsEnabled = false private var skipButtonsEnabled = false
private var pipEnabled = true
/** /**
* for autoplay * for autoplay
@ -328,6 +329,11 @@ class PlayerFragment : BaseFragment() {
PreferenceKeys.SKIP_BUTTONS, PreferenceKeys.SKIP_BUTTONS,
false false
) )
pipEnabled = PreferenceHelper.getBoolean(
PreferenceKeys.PICTURE_IN_PICTURE,
true
)
} }
private fun initializeTransitionLayout() { private fun initializeTransitionLayout() {
@ -1629,11 +1635,6 @@ class PlayerFragment : BaseFragment() {
} }
private fun shouldStartPiP(): Boolean { private fun shouldStartPiP(): Boolean {
val pipEnabled = PreferenceHelper.getBoolean(
PreferenceKeys.PICTURE_IN_PICTURE,
true
)
if (!pipEnabled) return false if (!pipEnabled) return false
val bounds = Rect() val bounds = Rect()