You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Chat_in_Channel/MessageList.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,15 @@
2
2
3
3
## Lists messages in row contents
4
4
5
-
In the constructor, you can list message objects that conform to `MessageProtocol` to display messages using the `rowContent` parameter.
5
+
In the intializer, you can list message objects that conform to `MessageProtocol` to display messages using the `rowContent` parameter.
6
6
7
7
All the body and row contents are flipped vertically so that new messages can be listed from the bottom.
8
8
9
9
The messages are listed in the following order, depending on the `readReceipt` value of the `MessageProtocol`. For more details, please refer to `MessageProtocol/readReceipt` or `ReadReceipt`.
10
10
11
-
sending → failed → sent → delivered → seen
11
+
> **NOTE:** The order of the messages is like below:
Copy file name to clipboardExpand all lines: Sources/ChatUI/ChatInChannel/MessageField/MessageField.swift
+44
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,50 @@ import Combine
9
9
import SwiftUI
10
10
import PhotosUI
11
11
12
+
/**
13
+
The view for sending messages.
14
+
15
+
When creating a `MessageField`, you can provide an action for how to handle a new `MessageStyle` information in the `onSend` parameter. `MessageStyle` can contain different types of messages, such as text, media (photo, video, document, contact), and voice.
16
+
17
+
```swift
18
+
MessageField { messageStyle in
19
+
viewModel.sendMessage($0)
20
+
}
21
+
```
22
+
23
+
To handle menu items, assign state property to `isMenuItemPresented` parameter.
Copy file name to clipboardExpand all lines: Sources/ChatUI/ChatInChannel/MessageList.swift
+11-3
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,17 @@
7
7
8
8
import SwiftUI
9
9
10
+
/**
11
+
The view that lists message objects.
12
+
13
+
In the intializer, you can list message objects that conform to ``MessageProtocol`` to display messages using the `rowContent` parameter.
10
14
15
+
All the body and row contents are flipped vertically so that new messages can be listed from the bottom.
16
+
17
+
The messages are listed in the following order, depending on the ``ReadReceipt`` value of the ``MessageProtocol``. For more details, please refer to ``MessageProtocol/readReceipt`` or ``ReadReceipt``.
18
+
19
+
- **NOTE:** The order of the messages: sending → failed → sent → delivered → seen
0 commit comments