mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-12 06:34:59 +00:00
android: fix crash when playing recorded voice message (#3325)
* android: fix crash when playing recorded voice message * better
This commit is contained in:
committed by
GitHub
parent
8d891005d9
commit
e7d6ed66da
+5
-1
@@ -776,7 +776,11 @@ fun ComposeView(
|
||||
.collect {
|
||||
when(it) {
|
||||
is RecordingState.Started -> onAudioAdded(it.filePath, it.progressMs, false)
|
||||
is RecordingState.Finished -> onAudioAdded(it.filePath, it.durationMs, true)
|
||||
is RecordingState.Finished -> if (it.durationMs > 300) {
|
||||
onAudioAdded(it.filePath, it.durationMs, true)
|
||||
} else {
|
||||
cancelVoice()
|
||||
}
|
||||
is RecordingState.NotStarted -> {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user