public class ConversationViewModel
extends AndroidViewModel
Modifier and Type | Class and Description |
---|---|
static class |
ConversationViewModel.Factory |
Constructor and Description |
---|
ConversationViewModel(android.app.Application application) |
ConversationViewModel(java.lang.String targetId,
Conversation.ConversationType conversationType,
java.lang.String title,
android.app.Application application) |
Modifier and Type | Method and Description |
---|---|
void |
clearMessages(Conversation.ConversationType conversationType,
java.lang.String targetId,
<any> callback)
根据会话类型,清空某一会话的所有聊天消息记录,回调方式获取清空是否成功。
|
<any> |
getTypingStatusInfo()
获取正在输入的状态信息
|
protected void |
onCleared() |
public ConversationViewModel(android.app.Application application)
public ConversationViewModel(java.lang.String targetId, Conversation.ConversationType conversationType, java.lang.String title, android.app.Application application)
public <any> getTypingStatusInfo()
protected void onCleared()
public void clearMessages(Conversation.ConversationType conversationType, java.lang.String targetId, <any> callback)
conversationType
- 会话类型。不支持传入 ConversationType.CHATROOM。targetId
- 目标 Id。根据不同的 conversationType,可能是用户 Id、讨论组 Id、群组 Id。callback
- 清空是否成功的回调。