File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
Sources/StreamChatSwiftUI Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -74,15 +74,20 @@ struct MessageDateView: View {
7474}
7575
7676/// View that displays the read indicator for a message.
77- struct MessageReadIndicatorView : View {
77+ public struct MessageReadIndicatorView : View {
7878 @Injected ( \. images) private var images
7979 @Injected ( \. fonts) private var fonts
8080 @Injected ( \. colors) private var colors
8181
8282 var readUsers : [ ChatUser ]
8383 var showReadCount : Bool
8484
85- var body : some View {
85+ public init ( readUsers: [ ChatUser ] , showReadCount: Bool ) {
86+ self . readUsers = readUsers
87+ self . showReadCount = showReadCount
88+ }
89+
90+ public var body : some View {
8691 HStack ( spacing: 2 ) {
8792 if showReadCount && !readUsers. isEmpty {
8893 Text ( " \( readUsers. count) " )
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ public struct SubtitleText: View {
1111
1212 var text : String
1313
14+ public init ( text: String ) {
15+ self . text = text
16+ }
17+
1418 public var body : some View {
1519 Text ( text)
1620 . lineLimit ( 1 )
@@ -56,14 +60,18 @@ public struct AvatarView: View {
5660 }
5761}
5862
59- struct ChatTitleView : View {
63+ public struct ChatTitleView : View {
6064
6165 @Injected ( \. fonts) private var fonts
6266 @Injected ( \. colors) private var colors
6367
6468 var name : String
6569
66- var body : some View {
70+ public init ( name: String ) {
71+ self . name = name
72+ }
73+
74+ public var body : some View {
6775 Text ( name)
6876 . lineLimit ( 1 )
6977 . font ( fonts. bodyBold)
Original file line number Diff line number Diff line change 55import SwiftUI
66
77/// View shown when other users are typing.
8- struct TypingIndicatorView : View {
8+ public struct TypingIndicatorView : View {
99
1010 @State private var isTyping = false
1111
1212 private let animationDuration : CGFloat = 0.75
1313
14- var body : some View {
14+ public init ( ) { /* Public init */ }
15+
16+ public var body : some View {
1517 HStack ( spacing: 4 ) {
1618 TypingIndicatorCircle ( isTyping: isTyping)
1719 . animation (
You can’t perform that action at this time.
0 commit comments