mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
update transitions if order for better readability
This commit is contained in:
parent
79c8a78ea2
commit
0b63c145a3
@ -445,7 +445,15 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
|
||||
if (_binding == null) return
|
||||
|
||||
if (currentId == transitionEndId) {
|
||||
if (currentId == transitionStartId) {
|
||||
viewModel.isMiniPlayerVisible.value = false
|
||||
// re-enable captions
|
||||
updateCurrentSubtitle(currentSubtitle)
|
||||
binding.player.useController = true
|
||||
commentsViewModel.setCommentSheetExpand(true)
|
||||
mainMotionLayout.progress = 0F
|
||||
changeOrientationMode()
|
||||
} else if (currentId == transitionEndId) {
|
||||
viewModel.isMiniPlayerVisible.value = true
|
||||
// disable captions temporarily
|
||||
updateCurrentSubtitle(null)
|
||||
@ -454,14 +462,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
binding.sbSkipBtn.isGone = true
|
||||
mainMotionLayout.progress = 1F
|
||||
(activity as MainActivity).requestOrientationChange()
|
||||
} else if (currentId == transitionStartId) {
|
||||
viewModel.isMiniPlayerVisible.value = false
|
||||
// re-enable captions
|
||||
updateCurrentSubtitle(currentSubtitle)
|
||||
binding.player.useController = true
|
||||
commentsViewModel.setCommentSheetExpand(true)
|
||||
mainMotionLayout.progress = 0F
|
||||
changeOrientationMode()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user