addEventHandler method

void addEventHandler(
  1. String identifier,
  2. EMChatThreadEventHandler 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 EMChatThreadEventHandler. ~end

~chinese 添加 Thread 事件监听。

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

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

Implementation

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