mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
Merge pull request #3343 from Bnyro/master
Fix crashes on audio player transitions
This commit is contained in:
commit
7d0c48cc75
@ -17,7 +17,6 @@ import androidx.constraintlayout.motion.widget.MotionLayout
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.fragment.app.commit
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.api.obj.StreamItem
|
||||
import com.github.libretube.databinding.FragmentAudioPlayerBinding
|
||||
@ -123,6 +122,8 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions {
|
||||
}
|
||||
|
||||
binding.openVideo.setOnClickListener {
|
||||
BackgroundHelper.stopBackgroundPlay(requireContext())
|
||||
killFragment()
|
||||
NavigationHelper.navigateVideo(
|
||||
context = requireContext(),
|
||||
videoId = PlayingQueue.getCurrent()?.url?.toID(),
|
||||
@ -130,8 +131,6 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions {
|
||||
keepQueue = true,
|
||||
forceVideo = true
|
||||
)
|
||||
BackgroundHelper.stopBackgroundPlay(requireContext())
|
||||
findNavController().popBackStack()
|
||||
}
|
||||
|
||||
binding.share.setOnClickListener {
|
||||
|
@ -478,10 +478,8 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
keepQueue = true,
|
||||
keepVideoPlayerAlive = true
|
||||
)
|
||||
handler.postDelayed(500) {
|
||||
NavigationHelper.startAudioPlayer(requireContext())
|
||||
killPlayerFragment()
|
||||
}
|
||||
killPlayerFragment()
|
||||
NavigationHelper.startAudioPlayer(requireContext())
|
||||
}
|
||||
|
||||
private fun setFullscreen() {
|
||||
|
Loading…
Reference in New Issue
Block a user