File tree Expand file tree Collapse file tree 5 files changed +31
-4
lines changed
Sources/StreamChatSwiftUI/ChatChannel Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
10
10
- Fixed a bug with channel list refreshing after deeplinking
11
11
- Navigation bar iPad resizing issue
12
12
13
+ ### 🔄 Changed
14
+ - Docs restructuring
15
+ - Exposed some view components as public
16
+
13
17
# [ 4.19.0] ( https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.19.0 )
14
18
_ July 21, 2022_
15
19
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ extension View {
83
83
/// - Parameters:
84
84
/// - uploadState: the upload state of the asset.
85
85
/// - url: the url of the asset.
86
- func withUploadingStateIndicator( for uploadState: AttachmentUploadingState ? , url: URL ) -> some View {
86
+ public func withUploadingStateIndicator( for uploadState: AttachmentUploadingState ? , url: URL ) -> some View {
87
87
modifier ( AttachmentUploadingStateViewModifier ( uploadState: uploadState, url: url) )
88
88
}
89
89
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public struct VideoPlayerView: View {
19
19
20
20
private let avPlayer : AVPlayer
21
21
22
- init (
22
+ public init (
23
23
attachment: ChatMessageVideoAttachment ,
24
24
author: ChatUser ,
25
25
isShown: Binding < Bool >
Original file line number Diff line number Diff line change @@ -75,13 +75,17 @@ public struct ImageAttachmentContainer<Factory: ViewFactory>: View {
75
75
}
76
76
}
77
77
78
- struct AttachmentTextView : View {
78
+ public struct AttachmentTextView : View {
79
79
80
80
@Injected ( \. colors) private var colors
81
81
82
82
var message : ChatMessage
83
83
84
- var body : some View {
84
+ public init ( message: ChatMessage ) {
85
+ self . message = message
86
+ }
87
+
88
+ public var body : some View {
85
89
HStack {
86
90
Text ( message. adjustedText)
87
91
. standardPadding ( )
Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ public struct VideoAttachmentsList: View {
63
63
let message : ChatMessage
64
64
let width : CGFloat
65
65
66
+ public init ( message: ChatMessage , width: CGFloat ) {
67
+ self . message = message
68
+ self . width = width
69
+ }
70
+
66
71
public var body : some View {
67
72
VStack {
68
73
ForEach ( message. videoAttachments, id: \. self) { attachment in
@@ -88,6 +93,20 @@ public struct VideoAttachmentView: View {
88
93
var ratio : CGFloat = 0.75
89
94
var cornerRadius : CGFloat = 24
90
95
96
+ public init (
97
+ attachment: ChatMessageVideoAttachment ,
98
+ message: ChatMessage ,
99
+ width: CGFloat ,
100
+ ratio: CGFloat = 0.75 ,
101
+ cornerRadius: CGFloat = 24
102
+ ) {
103
+ self . attachment = attachment
104
+ self . message = message
105
+ self . width = width
106
+ self . ratio = ratio
107
+ self . cornerRadius = cornerRadius
108
+ }
109
+
91
110
@State var previewImage : UIImage ?
92
111
@State var error : Error ?
93
112
@State var fullScreenShown = false
You can’t perform that action at this time.
0 commit comments