Skip to content

Commit 8a12cfc

Browse files
Cleanup of audio session only when voice recording is enabled
1 parent 4444626 commit 8a12cfc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
33

44
# Upcoming
55

6-
### 🔄 Changed
6+
### 🐞 Fixed
7+
- Cleanup of audio session only when voice recording is enabled
78

89
# [4.47.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.47.0)
910
_January 09, 2024_

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
687687
}
688688

689689
private func cleanupAudioPlayer() {
690+
guard utils.composerConfig.isVoiceRecordingEnabled else { return }
690691
utils.audioPlayer.seek(to: 0)
691692
utils.audioPlayer.updateRate(.normal)
692693
utils.audioPlayer.stop()

0 commit comments

Comments
 (0)