Detekt: fix ArrayPrimitive
This commit is contained in:
parent
c3b5ba5639
commit
f02bad5c79
|
@ -225,7 +225,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
|||
override fun onUpdate(state: AudioMessagePlaybackTracker.Listener.State) {
|
||||
when (state) {
|
||||
is AudioMessagePlaybackTracker.Listener.State.Recording -> {
|
||||
voiceMessageViews.renderRecordingWaveform(state.amplitudeList.toTypedArray())
|
||||
voiceMessageViews.renderRecordingWaveform(state.amplitudeList.toList())
|
||||
}
|
||||
is AudioMessagePlaybackTracker.Listener.State.Playing -> {
|
||||
voiceMessageViews.renderPlaying(state)
|
||||
|
|
|
@ -345,10 +345,10 @@ class VoiceMessageViews(
|
|||
}
|
||||
}
|
||||
|
||||
fun renderRecordingWaveform(amplitudeList: Array<Int>) {
|
||||
fun renderRecordingWaveform(amplitudeList: List<Int>) {
|
||||
views.voicePlaybackWaveform.doOnLayout { waveFormView ->
|
||||
val waveformColor = ThemeUtils.getColor(waveFormView.context, R.attr.vctr_content_quaternary)
|
||||
amplitudeList.iterator().forEach {
|
||||
amplitudeList.forEach {
|
||||
(waveFormView as AudioWaveformView).add(AudioWaveformView.FFT(it.toFloat(), waveformColor))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue