Add progress indicator for sending voice messages (#1618)

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
jonnyandrew 2023-10-24 09:36:42 +01:00 committed by GitHub
parent e61c7d8de0
commit bdc52332bb
31 changed files with 83 additions and 18 deletions

View file

@ -142,7 +142,11 @@ class VoiceMessageComposerPresenter @Inject constructor(
return VoiceMessageComposerState(
voiceMessageState = when (val state = recorderState) {
is VoiceRecorderState.Recording -> VoiceMessageState.Recording(level = state.level)
is VoiceRecorderState.Finished -> VoiceMessageState.Preview
is VoiceRecorderState.Finished -> if (isSending) {
VoiceMessageState.Sending
} else {
VoiceMessageState.Preview
}
else -> VoiceMessageState.Idle
},
showPermissionRationaleDialog = permissionState.showDialog,