fix: play local video version dialog hidden if autofullscreen enabled

This commit is contained in:
Bnyro 2025-01-09 15:53:45 +01:00
parent 8a3ea3b695
commit 383015f3f8

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)
}