diff --git a/.gitignore b/.gitignore index 4b3937551..181c19d74 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,7 @@ buildcache App Thinning Size Report.txt app-thinning.plist *.dmg + +# VSCode +.vscode +buildServer.json diff --git a/CHANGELOG.md b/CHANGELOG.md index b35daf574..b79c75a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # Upcoming +### ✅ Added +- Make `VoiceRecordingButton` public [#658](https://github.com/GetStream/stream-chat-swiftui/pull/658) ### 🐞 Fixed - Fix message long press taking too much time to show actions [#648](https://github.com/GetStream/stream-chat-swiftui/pull/648) ### 🔄 Changed diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Composer/TrailingComposerView.swift b/Sources/StreamChatSwiftUI/ChatChannel/Composer/TrailingComposerView.swift index f02dd43f7..ebc0ad31a 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Composer/TrailingComposerView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Composer/TrailingComposerView.swift @@ -38,7 +38,8 @@ public struct TrailingComposerView: View { } } -struct VoiceRecordingButton: View { +/// The button responsible to start voice recording. +public struct VoiceRecordingButton: View { @Injected(\.colors) var colors @Injected(\.utils) var utils @@ -47,7 +48,11 @@ struct VoiceRecordingButton: View { @State private var longPressed = false @State private var longPressStarted: Date? - var body: some View { + public init(viewModel: MessageComposerViewModel) { + self.viewModel = viewModel + } + + public var body: some View { Image(systemName: "mic") .foregroundColor(Color(colors.textLowEmphasis)) .gesture(