File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Sources/StreamChatSwiftUI/ChatChannelList Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55
66### ✅ Added
77- Configuring avatars visibility in groups
8+ - Method to swap the ` MessageRepliesView `
9+ - Public init for ` ChatChannelListItem `
810
911### 🔄 Changed
1012- Message list creation requires ` shouldShowTypingIndicator ` as a parameter
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public struct ChatChannelListItem: View {
1313 @Injected ( \. utils) private var utils
1414 @Injected ( \. images) private var images
1515 @Injected ( \. chatClient) private var chatClient
16-
16+
1717 var channel : ChatChannel
1818 var channelName : String
1919 var injectedChannelInfo : InjectedChannelInfo ?
@@ -22,6 +22,24 @@ public struct ChatChannelListItem: View {
2222 var disabled = false
2323 var onItemTap : ( ChatChannel ) -> Void
2424
25+ public init (
26+ channel: ChatChannel ,
27+ channelName: String ,
28+ injectedChannelInfo: InjectedChannelInfo ? = nil ,
29+ avatar: UIImage ,
30+ onlineIndicatorShown: Bool ,
31+ disabled: Bool = false ,
32+ onItemTap: @escaping ( ChatChannel ) -> Void
33+ ) {
34+ self . channel = channel
35+ self . channelName = channelName
36+ self . injectedChannelInfo = injectedChannelInfo
37+ self . avatar = avatar
38+ self . onlineIndicatorShown = onlineIndicatorShown
39+ self . disabled = disabled
40+ self . onItemTap = onItemTap
41+ }
42+
2543 public var body : some View {
2644 Button {
2745 onItemTap ( channel)
You can’t perform that action at this time.
0 commit comments