|
|
|
@ -68,6 +68,9 @@ import org.videolan.vlc.viewmodels.EqualizerViewModel |
|
|
|
import org.videolan.vlc.viewmodels.EqualizerViewModelFactory |
|
|
|
import kotlin.math.absoluteValue |
|
|
|
import kotlin.math.roundToInt |
|
|
|
import androidx.core.view.isEmpty |
|
|
|
import androidx.core.view.isNotEmpty |
|
|
|
import org.videolan.vlc.viewmodels.EqualizerViewModel.Companion.currentEqualizerIdLive |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -134,6 +137,11 @@ class EqualizerFragmentDialog : VLCBottomSheetDialogFragment(), Slider.OnChangeL |
|
|
|
MediaPlayer.Equalizer.getBandCount() |
|
|
|
} |
|
|
|
} |
|
|
|
if (binding.equalizerPresets.isNotEmpty() && oldCurrentEqualizer != null && oldCurrentEqualizer?.equalizerEntry?.id != currentEqualizerIdLive.value) { |
|
|
|
binding.equalizerPresets.children.forEach { |
|
|
|
if (it.tag == currentEqualizerIdLive.value) it.performClick() |
|
|
|
} |
|
|
|
} |
|
|
|
//Workaround fix for bottom sheet bug with animateLayoutChanges |
|
|
|
val transition = LayoutTransition() |
|
|
|
transition.setAnimateParentHierarchy(false) |
|
|
|
|