addEventHandler method

void addEventHandler(
  1. String identifier,
  2. ChatThreadEventHandler handler
)

~english Adds the chat thread event handler. After calling this method, you can handle for chat thread event when they arrive.

Param identifier The custom handler identifier, is used to find the corresponding handler.

Param handler The handle for chat thread event. See ChatThreadEventHandler. ~end

~chinese 添加 Thread 事件监听。

Param identifier 自定义事件 ID,用于查找事件监听。

Param handler 事件监听. 请见 ChatThreadEventHandler. ~end

Implementation

void addEventHandler(
  String identifier,
  ChatThreadEventHandler handler,
) {
  _eventHandlesMap[identifier] = handler;
}