Política de Privacidade do
Contrato de Privacidade e Segurança de Dados
Conversation List | Conversation Actions |
![]() | ![]() |
Method | Parameter | Description |
init | onConversationClick: @escaping (ConversationInfo) -> Void | Initializes the component and sets the conversation click Webhook. Required. |
| config: ConversationActionConfigProtocol = ChatConversationActionConfig() | Initializes the component and sets the conversation action menu items. Optional. |
| customActions: [ConversationCustomAction] = [] | Initializes the component and sets custom conversation action options. Optional. |
Parameter Name | Type | Description |
onConversationClick | (ConversationInfo) -> Void | Conversation click Webhook, triggered when a user clicks a conversation cell. |
import AtomicXimport SwiftUIstruct ContentView: View {var body: some View {ConversationList(onConversationClick: { conversation in// Recommended: Navigate to the chat page here})}}
struct CustomConversationView: View {var body: some View {ConversationList(onConversationClick: { conversation in// Navigate on conversation cell click},// Hide ClearHistoryconfig: ChatConversationActionConfig(isSupportDelete: true, isSupportPin: true, isSupportClearHistory: false))}}
Action Type | Description |
isSupportDelete | Enable or disable deleting conversations |
isSupportPin | Enable or disable Pin Conversation |
isSupportClearHistory | Enable or disable clearing conversation history |
customActions when initializing ConversationList. ConversationList will display your custom options below the default actions:Parameter Name | Type | Description |
customActions | [ConversationCustomAction] | Custom conversation actions, shown when the user opens the conversation action menu. |
struct CustomConversationView: View {var body: some View {ConversationList(onConversationClick: { conversation inonShowMessage?(NavigationInfo(conversation: conversation))},// Custom actionscustomActions: [ConversationCustomAction(title: "Share") { conversation inprint("Share conversation: \\(conversation.title ?? "")")},]).conversationActions([.delete, .pin, .clearHistory]).environmentObject(themeState)}}
AppBuilderConfig:// Set this at application startup; if omitted, the feature is not enabledAppBuilderConfig.shared.conversationActionList = [.delete, // Enable delete.pin, // Enable Pin Conversation.clearHistory // Enable clearing conversation messages]// Then initialize ConversationList; all ConversationList instances will use the above conversationActionList configurationConversationList(onConversationClick: { conversation in// Navigate to the chat page here if needed})
Conversation Actions (Default Options) | Conversation Actions (Delete Option Hidden) | Conversation Actions (Share Option Added) |
![]() | ![]() | ![]() |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários