Skip to content

Commit b2d67a9

Browse files
authored
Make VoiceRecordingButton public (#658)
* Make `VoiceRecordingButton` public * Add vscode to git ignore * Update CHANGELOG.md * Expose init
1 parent 854c552 commit b2d67a9

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,7 @@ buildcache
9191
App Thinning Size Report.txt
9292
app-thinning.plist
9393
*.dmg
94+
95+
# VSCode
96+
.vscode
97+
buildServer.json

CHANGELOG.md

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

44
# Upcoming
55

6+
### ✅ Added
7+
- Make `VoiceRecordingButton` public [#658](https://github.com/GetStream/stream-chat-swiftui/pull/658)
68
### 🐞 Fixed
79
- Fix message long press taking too much time to show actions [#648](https://github.com/GetStream/stream-chat-swiftui/pull/648)
810
### 🔄 Changed

Sources/StreamChatSwiftUI/ChatChannel/Composer/TrailingComposerView.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public struct TrailingComposerView: View {
3838
}
3939
}
4040

41-
struct VoiceRecordingButton: View {
41+
/// The button responsible to start voice recording.
42+
public struct VoiceRecordingButton: View {
4243
@Injected(\.colors) var colors
4344
@Injected(\.utils) var utils
4445

@@ -47,7 +48,11 @@ struct VoiceRecordingButton: View {
4748
@State private var longPressed = false
4849
@State private var longPressStarted: Date?
4950

50-
var body: some View {
51+
public init(viewModel: MessageComposerViewModel) {
52+
self.viewModel = viewModel
53+
}
54+
55+
public var body: some View {
5156
Image(systemName: "mic")
5257
.foregroundColor(Color(colors.textLowEmphasis))
5358
.gesture(

0 commit comments

Comments
 (0)