mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #2342 from Kruna1Pate1/fix/swipe-gesture-improvement
Fix sync of volume progress changed by other mediums
This commit is contained in:
commit
75db99ba70
@ -416,8 +416,15 @@ internal class CustomExoPlayerView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun updateVolume(distance: Float) {
|
private fun updateVolume(distance: Float) {
|
||||||
gestureViewBinding.volumeControlView.visibility = View.VISIBLE
|
|
||||||
val bar = gestureViewBinding.volumeProgressBar
|
val bar = gestureViewBinding.volumeProgressBar
|
||||||
|
gestureViewBinding.volumeControlView.apply {
|
||||||
|
if (visibility == View.GONE) {
|
||||||
|
visibility = View.VISIBLE
|
||||||
|
// Volume could be changed using other mediums, sync progress
|
||||||
|
// bar with new value.
|
||||||
|
bar.progress = audioHelper.getVolumeWithScale(bar.max)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (bar.progress == 0) {
|
if (bar.progress == 0) {
|
||||||
gestureViewBinding.volumeImageView.setImageResource(
|
gestureViewBinding.volumeImageView.setImageResource(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user