Skip to content

Commit 6e6f2a7

Browse files
Made some params in MessageListView optional
1 parent db3a362 commit 6e6f2a7

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
- Add message preview with attachments in channel list
88

99
### 🐞 Fixed
10-
- Made some `ChannelList` parameters optional
10+
- Made some `ChannelList` and `MessageListView` parameters optional
1111

1212
# [4.39.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.39.0)
1313
_October 06, 2023_

Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ public struct DefaultChannelHeaderModifier: ChatChannelHeaderViewModifier {
9797
@State private var isActive: Bool = false
9898

9999
public var channel: ChatChannel
100+
101+
public init(channel: ChatChannel) {
102+
self.channel = channel
103+
}
100104

101105
public func body(content: Content) -> some View {
102106
content.toolbar {

Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public struct MessageComposerView<Factory: ViewFactory>: View, KeyboardReadable
2525
viewFactory: Factory,
2626
viewModel: MessageComposerViewModel? = nil,
2727
channelController: ChatChannelController,
28-
messageController: ChatMessageController?,
28+
messageController: ChatMessageController? = nil,
2929
quotedMessage: Binding<ChatMessage?>,
3030
editedMessage: Binding<ChatMessage?>,
3131
onMessageSent: @escaping () -> Void

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public struct MessageListView<Factory: ViewFactory>: View, KeyboardReadable {
6767
quotedMessage: Binding<ChatMessage?>,
6868
currentDateString: String? = nil,
6969
listId: String,
70-
isMessageThread: Bool,
71-
shouldShowTypingIndicator: Bool,
70+
isMessageThread: Bool = false,
71+
shouldShowTypingIndicator: Bool = false,
7272
onMessageAppear: @escaping (Int) -> Void,
7373
onScrollToBottom: @escaping () -> Void,
7474
onLongPress: @escaping (MessageDisplayInfo) -> Void

0 commit comments

Comments
 (0)