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