Skip to content

Commit dfcd961

Browse files
nuno-vieirasheep-q
andauthored
Expose AddedVoiceRecordingsView + Expose composer attachments functions (#1049)
* Make the AddedVoiceRecordingsView public (#1035) * Make the AddedVoiceRecordingsView public * Make the initializer of FilePickerView public * Add `updateAddedAssets` func * Update CHANGELOG.md --------- Co-authored-by: Lucas Nguyen <[email protected]>
1 parent 62d831f commit dfcd961

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

CHANGELOG.md

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

44
# Upcoming
55

6-
### 🔄 Changed
6+
### ✅ Added
7+
- Expose `AddedVoiceRecordingsView` [#1049](https://github.com/GetStream/stream-chat-swiftui/pull/1049)
8+
- Expose `FilePickerView.init(fileURLs:)` [#1049](https://github.com/GetStream/stream-chat-swiftui/pull/1049)
9+
- Add `MessageComposerViewModel.updateAddedAssets()` [#1049](https://github.com/GetStream/stream-chat-swiftui/pull/1049)
710

811
# [4.92.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.92.0)
912
_November 07, 2025_

Sources/StreamChatSwiftUI/ChatChannel/Composer/FilePickerView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import UniformTypeIdentifiers
99
public struct FilePickerView: UIViewControllerRepresentable {
1010
@Injected(\.chatClient) var client
1111
@Binding var fileURLs: [URL]
12+
13+
public init(fileURLs: Binding<[URL]>) {
14+
self._fileURLs = fileURLs
15+
}
1216

1317
public func makeUIViewController(context: Context) -> UIDocumentPickerViewController {
1418
let picker = UIDocumentPickerViewController(forOpeningContentTypes: openingContentTypes)

Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,10 @@ open class MessageComposerViewModel: ObservableObject {
874874
return checkAttachmentSize(with: url)
875875
}
876876

877+
public func updateAddedAssets(_ assets: [AddedAsset]) {
878+
addedAssets = assets
879+
}
880+
877881
private func checkAttachmentSize(with url: URL?) -> Bool {
878882
guard let url = url else { return true }
879883

Sources/StreamChatSwiftUI/ChatChannel/Composer/VoiceRecording/AddedVoiceRecordingsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import StreamChat
66
import SwiftUI
77

8-
struct AddedVoiceRecordingsView: View {
8+
public struct AddedVoiceRecordingsView: View {
99
@Injected(\.colors) private var colors
1010
@Injected(\.utils) private var utils
1111

0 commit comments

Comments
 (0)