File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Sources/StreamChatSwiftUI/ChatChannel Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,21 @@ import StreamChat
6
6
import SwiftUI
7
7
8
8
/// Screen component for the chat channel view.
9
- public struct ChatChannelScreen : View {
10
- public var chatChannelController : ChatChannelController
9
+ public struct ChatChannelScreen < Factory> : View where Factory: ViewFactory {
10
+ public let chatChannelController : ChatChannelController
11
+ private let viewFactory : Factory
11
12
13
+ public init (
14
+ chatChannelController: ChatChannelController ,
15
+ viewFactory: Factory = DefaultViewFactory . shared
16
+ ) {
17
+ self . chatChannelController = chatChannelController
18
+ self . viewFactory = viewFactory
19
+ }
20
+
12
21
public var body : some View {
13
22
ChatChannelView (
14
- viewFactory: DefaultViewFactory . shared ,
23
+ viewFactory: viewFactory ,
15
24
channelController: chatChannelController
16
25
)
17
26
}
You can’t perform that action at this time.
0 commit comments