Fix playback and recording of voice messages (#1948)

This commit is contained in:
Nicolas Mauri
2023-10-24 18:49:42 +02:00
committed by GitHub
parent 37f1a79a11
commit f9ad44f96a
10 changed files with 115 additions and 55 deletions
@@ -243,7 +243,7 @@ struct ComposerToolbar: View {
} stopRecording: {
if let voiceMessageRecordingStartTime, Date.now.timeIntervalSince(voiceMessageRecordingStartTime) < voiceMessageMinimumRecordingDuration {
context.send(viewAction: .cancelVoiceMessageRecording)
withAnimation {
withElementAnimation {
showVoiceMessageRecordingTooltip = true
}
} else {
@@ -273,7 +273,7 @@ struct ComposerToolbar: View {
.allowsHitTesting(false)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + voiceMessageTooltipDuration) {
withAnimation {
withElementAnimation {
showVoiceMessageRecordingTooltip = false
}
}