mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Merge pull request #4801 from Bnyro/master
fix: don't resume initial video on fragment recreation
This commit is contained in:
commit
8063a672de
@ -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