Package io.rong.imkit.conversationlist.viewmodel

## Class ConversationListViewModel

- All Implemented Interfaces:

      public class ConversationListViewModel

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConversationListViewModel(Application application)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `getConversationList(boolean loadMore, boolean isEventManual, long delayTime)` | 从本地数据库获取会话列表。 此处借鉴前端的函数节流思想，在 REFRESH_INTERVAL 时间内，丢弃掉其它触发，只做一次执行。 以便提高接受大量消息时的刷新性能。
    `void` | `onResume()` |
    `MediatorLiveData<List<BaseUiConversation>>` | `getConversationListLiveData()` |
    `LiveData<NoticeContent>` | `getNoticeContentLiveData()` | 获取连接状态通知内容
    `LiveData<RefreshEvent>` | `getRefreshEventLiveData()` | 获取刷新事件 LiveData
    `void` | `clearAllNotification()` |
    `void` | `onUserUpdate(UserInfo info)` |
    `void` | `onGroupUpdate(Group group)` |
    `void` | `onGroupUserInfoUpdate(GroupUserInfo groupUserInfo)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConversationListViewModel

          ConversationListViewModel(Application application)

  - ### Method Detail

    - #### getConversationList

           void getConversationList(boolean loadMore, boolean isEventManual, long delayTime)

      从本地数据库获取会话列表。 此处借鉴前端的函数节流思想，在 REFRESH_INTERVAL 时间内，丢弃掉其它触发，只做一次执行。 以便提高接受大量消息时的刷新性能。

      Parameters:
        `loadMore` - 是否根据上次同步的时间戳拉取更多会话。 false: 从数据库拉取最新 N 条会话。true: 根据 UI 上最后一条会话的时间戳，继续拉取之前的 N 条会话。
        `isEventManual` - 是否是用还手动触发的刷新获取，手动触发的需要主动关闭下

    - #### onResume

           void onResume()

    - #### getConversationListLiveData

           MediatorLiveData<List<BaseUiConversation>> getConversationListLiveData()

    - #### getNoticeContentLiveData

           LiveData<NoticeContent> getNoticeContentLiveData()

      获取连接状态通知内容

    - #### getRefreshEventLiveData

           LiveData<RefreshEvent> getRefreshEventLiveData()

      获取刷新事件 LiveData

      Returns:

        刷新事件

    - #### clearAllNotification

           void clearAllNotification()

    - #### onUserUpdate

           void onUserUpdate(UserInfo info)

    - #### onGroupUpdate

           void onGroupUpdate(Group group)

    - #### onGroupUserInfoUpdate

           void onGroupUserInfoUpdate(GroupUserInfo groupUserInfo)