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/).
5
5
6
6
### ✅ Added
7
7
- Configuring avatars visibility in groups
8
+ - Method to swap the ` MessageRepliesView `
9
+ - Public init for ` ChatChannelListItem `
8
10
9
11
### 🔄 Changed
10
12
- 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 {
13
13
@Injected ( \. utils) private var utils
14
14
@Injected ( \. images) private var images
15
15
@Injected ( \. chatClient) private var chatClient
16
-
16
+
17
17
var channel : ChatChannel
18
18
var channelName : String
19
19
var injectedChannelInfo : InjectedChannelInfo ?
@@ -22,6 +22,24 @@ public struct ChatChannelListItem: View {
22
22
var disabled = false
23
23
var onItemTap : ( ChatChannel ) -> Void
24
24
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
+
25
43
public var body : some View {
26
44
Button {
27
45
onItemTap ( channel)
You can’t perform that action at this time.
0 commit comments