Class ConversationViewModel

    • 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)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      MediatorLiveData<TypingInfo> getTypingStatusInfo() 获取正在输入的状态信息
      void )>clearMessages(ConversationType conversationType, String targetId, ResultCallback<Boolean> callback) 根据会话类型,清空某一会话的所有聊天消息记录,回调方式获取清空是否成功。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConversationViewModel

        ConversationViewModel(Application application)
      • ConversationViewModel

        ConversationViewModel(String targetId, ConversationType conversationType, String title, Application application)
    • 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 - 清空是否成功的回调。