Skip to content

Commit 5b5c839

Browse files
Added public init for PhotoAttachmentPickerView
1 parent 20417ad commit 5b5c839

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/StreamChatSwiftUI/ChatChannel/Composer/PhotoAttachmentPickerView.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import SwiftUI
77

88
/// View for the photo attachment picker.
99
public struct PhotoAttachmentPickerView: View {
10+
1011
@Injected(\.colors) private var colors
1112

1213
@StateObject var assetLoader = PhotoAssetLoader()
@@ -17,6 +18,16 @@ public struct PhotoAttachmentPickerView: View {
1718

1819
let columns = [GridItem(.adaptive(minimum: 120), spacing: 2)]
1920

21+
public init(
22+
assets: PHFetchResultCollection,
23+
onImageTap: @escaping (AddedAsset) -> Void,
24+
imageSelected: @escaping (String) -> Bool
25+
) {
26+
self.assets = assets
27+
self.onImageTap = onImageTap
28+
self.imageSelected = imageSelected
29+
}
30+
2031
public var body: some View {
2132
ScrollView {
2233
LazyVGrid(columns: columns, spacing: 2) {

0 commit comments

Comments
 (0)