Package io.rong.imkit.conversation
Class ConversationViewModel
-
- All Implemented Interfaces:
public class ConversationViewModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
ConversationViewModel.Factory
-
Field Summary
Fields Modifier and Type Field Description public MediatorLiveData<TypingInfo>
typingStatusInfo
-
Constructor Summary
Constructors Constructor Description ConversationViewModel(Application application)
ConversationViewModel(String targetId, ConversationType conversationType, String title, Application application)
-
Method Summary
Modifier and Type Method Description MediatorLiveData<TypingInfo>
getTypingStatusInfo()
获取正在输入的状态信息 void
)>clearMessages(ConversationType conversationType, String targetId, ResultCallback<Boolean> callback)
根据会话类型,清空某一会话的所有聊天消息记录,回调方式获取清空是否成功。 -
-
Method Detail
-
getTypingStatusInfo
MediatorLiveData<TypingInfo> getTypingStatusInfo()
获取正在输入的状态信息
- Returns:
输入状态
-
clearMessages
void )>clearMessages(ConversationType conversationType, String targetId, ResultCallback<Boolean> callback)
根据会话类型,清空某一会话的所有聊天消息记录,回调方式获取清空是否成功。
- Parameters:
conversationType
- 会话类型。不支持传入 ConversationType.targetId
- 目标 Id。根据不同的 conversationType,可能是用户 Id、讨论组 Id、群组 Id。callback
- 清空是否成功的回调。
-
-
-
-