Merge pull request #6936 from Bnyro/master

fix: play local video version dialog hidden if autofullscreen enabled
This commit is contained in:
Bnyro 2025-01-09 15:54:06 +01:00 committed by GitHub
commit a2e25899ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -437,7 +437,11 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
}
if (localDownloadVersion != null && createNewSession) {
childFragmentManager.setFragmentResultListener(
// the dialog must also be visible when in fullscreen, thus we need to use the activity's
// fragment manager and not the one from [PlayerFragment]
val fragmentManager = requireActivity().supportFragmentManager
fragmentManager.setFragmentResultListener(
PlayOfflineDialog.PLAY_OFFLINE_DIALOG_REQUEST_KEY, viewLifecycleOwner
) { _, bundle ->
if (bundle.getBoolean(IntentData.isPlayingOffline)) {
@ -459,7 +463,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
IntentData.videoTitle to localDownloadVersion.download.title,
IntentData.downloadInfo to downloadInfo
)
}.show(childFragmentManager, null)
}.show(fragmentManager, null)
} else {
attachToPlayerService(playerData, createNewSession)
}