# ConversationViewModel

public class ConversationViewModel

## Constructors

ConversationViewModel
Link copied to clipboard
public void ConversationViewModel(Application application)
public void ConversationViewModel(String targetId, ConversationType conversationType, String title, Application application)

## Types

Factory
Link copied to clipboard
public class Factory

## Properties

onlineStatus
Link copied to clipboard
public MediatorLiveData<SubscribeUserOnlineStatus> onlineStatus
typingStatusInfo
Link copied to clipboard
public MediatorLiveData<TypingInfo> typingStatusInfo

## Functions

clearMessages
Link copied to clipboard
public void clearMessages(ConversationType conversationType, String targetId, ResultCallback<Boolean> callback)
根据会话类型，清空某一会话的所有聊天消息记录,回调方式获取清空是否成功。
getNotificationStatus
Link copied to clipboard
public void getNotificationStatus(ConversationType type, String targetId)
getNotify
Link copied to clipboard
public MediatorLiveData<Boolean> getNotify()
getOnlineStatus
Link copied to clipboard
public MediatorLiveData<SubscribeUserOnlineStatus> getOnlineStatus()
getTypingStatusInfo
Link copied to clipboard
public MediatorLiveData<TypingInfo> getTypingStatusInfo()
获取正在输入的状态信息
getUserOnlineStatus
Link copied to clipboard
public void getUserOnlineStatus(String mTargetId)
isOnlineStatus
Link copied to clipboard
public boolean isOnlineStatus()