mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
fix: don't resume initial video on fragment recreation
This commit is contained in:
parent
0b40039e96
commit
3cc6690220
@ -841,6 +841,13 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
|
||||
isTransitioning = true
|
||||
videoId = nextVideoId
|
||||
|
||||
// fix: if the fragment is recreated, play the current video, and not the initial one
|
||||
arguments?.run {
|
||||
val playerData = parcelable<PlayerData>(IntentData.playerData)!!.copy(videoId = videoId)
|
||||
putParcelable(IntentData.playerData, playerData)
|
||||
}
|
||||
|
||||
// start to play the next video
|
||||
playVideo()
|
||||
// close comment bottom sheet for next video
|
||||
|
Loading…
Reference in New Issue
Block a user