diff --git a/CHANGELOG.md b/CHANGELOG.md index dc1a1d052..c270ff3d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # Upcoming -### 🔄 Changed +### ✅ Added +- Expose `AddedVoiceRecordingsView` [#1049](https://github.com/GetStream/stream-chat-swiftui/pull/1049) +- Expose `FilePickerView.init(fileURLs:)` [#1049](https://github.com/GetStream/stream-chat-swiftui/pull/1049) +- Add `MessageComposerViewModel.updateAddedAssets()` [#1049](https://github.com/GetStream/stream-chat-swiftui/pull/1049) # [4.92.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.92.0) _November 07, 2025_ diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Composer/FilePickerView.swift b/Sources/StreamChatSwiftUI/ChatChannel/Composer/FilePickerView.swift index 2604ef2a7..ced4647ed 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Composer/FilePickerView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Composer/FilePickerView.swift @@ -9,6 +9,10 @@ import UniformTypeIdentifiers public struct FilePickerView: UIViewControllerRepresentable { @Injected(\.chatClient) var client @Binding var fileURLs: [URL] + + public init(fileURLs: Binding<[URL]>) { + self._fileURLs = fileURLs + } public func makeUIViewController(context: Context) -> UIDocumentPickerViewController { let picker = UIDocumentPickerViewController(forOpeningContentTypes: openingContentTypes) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift index 545b5a57d..813e7796e 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift @@ -874,6 +874,10 @@ open class MessageComposerViewModel: ObservableObject { return checkAttachmentSize(with: url) } + public func updateAddedAssets(_ assets: [AddedAsset]) { + addedAssets = assets + } + private func checkAttachmentSize(with url: URL?) -> Bool { guard let url = url else { return true } diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Composer/VoiceRecording/AddedVoiceRecordingsView.swift b/Sources/StreamChatSwiftUI/ChatChannel/Composer/VoiceRecording/AddedVoiceRecordingsView.swift index e38726c58..88850d6a9 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Composer/VoiceRecording/AddedVoiceRecordingsView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Composer/VoiceRecording/AddedVoiceRecordingsView.swift @@ -5,7 +5,7 @@ import StreamChat import SwiftUI -struct AddedVoiceRecordingsView: View { +public struct AddedVoiceRecordingsView: View { @Injected(\.colors) private var colors @Injected(\.utils) private var utils