Skip to content

Commit a5b86ea

Browse files
Public init for the DefaultChannelListHeaderModifier
1 parent a73bca5 commit a5b86ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListHeader.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public struct DefaultChatChannelListHeader: ToolbarContent {
1616

1717
public var title: String
1818

19+
public init(title: String) {
20+
self.title = title
21+
}
22+
1923
public var body: some ToolbarContent {
2024
ToolbarItem(placement: .principal) {
2125
Text(title)
@@ -28,6 +32,10 @@ public struct DefaultChatChannelListHeader: ToolbarContent {
2832
public struct DefaultChannelListHeaderModifier: ChannelListHeaderViewModifier {
2933
public var title: String
3034

35+
public init(title: String) {
36+
self.title = title
37+
}
38+
3139
public func body(content: Content) -> some View {
3240
content.toolbar {
3341
DefaultChatChannelListHeader(title: title)

0 commit comments

Comments
 (0)