CometChatMessageList
.CometChatMessages
or custom) and navigation flow configured.Component | Role |
---|---|
CometChatMessageList | Displays group messages; handles long-press to show options. |
CometChatMessageOption | Defines the Message Privately option in the context menu. |
MessageDataSource | Supplies the messagePrivatelyOption in the options array. |
CometChatMessageListViewModel | Manages UI state, including hideMessagePrivatelyOption . |
CometChatMessages | Entry point for rendering or pushing the private chat interface. |
CometChatUIKit.getUser(uid:) | Retrieves the User object for the selected message sender. |
CometChatUIKit.getConversationWith(user:) | Creates or fetches the 1-on-1 conversation instance. |
UIViewController (Navigation) | Pushes or presents the private chat screen (CometChatMessages ). |
CometChatMessageList.swift
Ensures the option only appears when appropriate (e.g., user permissions).
CometChatMessageList.swift
Automates transition from group context to private conversation.
CometChatMessageList
.User
via CometChatUIKit.getUser(uid:)
.CometChatUIKit.getConversationWith(user:)
.CometChatMessages
onto the navigation stack.CometChatMessageOption
UI (icons, fonts, colors).viewModel.hideMessagePrivatelyOption
.MessageDataSource.getMessageOptions(for:)
.getConversationWith
.getUser
/getConversationWith
and alert user.sender.uid
is nil.CometChatMessageList
).Feature | Component / Method | File(s) |
---|---|---|
Show options menu | getMessageOptions(for:) | MessageDataSource.swift |
Toggle Message Privately | viewModel.hideMessagePrivatelyOption | CometChatMessageList.swift ,MessageListViewModel.swift |