Ensure audio waveform view adapts to large widths.

This commit is contained in:
Matthew Chen 2020-12-17 09:52:29 -03:00
parent 27e3046ab4
commit 55cf87010d

View File

@ -105,6 +105,8 @@ class AudioWaveformProgressView: UIView {
private func redrawSamples() {
AssertIsOnMainThread()
// Show the loading state if sampling of the waveform hasn't finished yet.
// TODO: This will eventually be a lottie animation of a waveform moving up and down
func showLoadingAnimation() {
playedShapeLayer.path = nil
unplayedShapeLayer.path = nil
@ -113,8 +115,6 @@ class AudioWaveformProgressView: UIView {
loadingAnimation.play()
}
// Show the loading state if sampling of the waveform hasn't finished yet.
// TODO: This will eventually be a lottie animation of a waveform moving up and down
guard audioWaveform?.isSamplingComplete == true else {
showLoadingAnimation()
return