mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
#4090 - Improved performances
This commit is contained in:
@@ -28,6 +28,7 @@ struct VoiceMessagePlaybackViewDetails {
|
||||
var playing: Bool = false
|
||||
var playbackEnabled = false
|
||||
var recording: Bool = false
|
||||
var loading: Bool = false
|
||||
}
|
||||
|
||||
class VoiceMessagePlaybackView: UIView, NibLoadable, Themable {
|
||||
@@ -83,10 +84,17 @@ class VoiceMessagePlaybackView: UIView, NibLoadable, Themable {
|
||||
}
|
||||
}
|
||||
|
||||
elapsedTimeLabel.text = details.currentTime
|
||||
_waveformView.progress = details.progress
|
||||
|
||||
_waveformView.setSamples(details.samples)
|
||||
if details.loading {
|
||||
elapsedTimeLabel.text = "--:--"
|
||||
_waveformView.progress = 0
|
||||
_waveformView.samples = []
|
||||
_waveformView.alpha = 0.3
|
||||
} else {
|
||||
elapsedTimeLabel.text = details.currentTime
|
||||
_waveformView.progress = details.progress
|
||||
_waveformView.samples = details.samples
|
||||
_waveformView.alpha = 1
|
||||
}
|
||||
|
||||
self.details = details
|
||||
|
||||
|
||||
Reference in New Issue
Block a user