MessageViewModel

public class MessageViewModel

Constructors

Link copied to clipboard
public void MessageViewModel(Application application)

Properties

Link copied to clipboard
public final static int DEFAULT_COUNT
Link copied to clipboard
public final static int DEFAULT_REMOTE_COUNT
Link copied to clipboard
public final static int SHOW_UNREAD_MESSAGE_COUNT
Link copied to clipboard
public static Array<String> writePermission

Functions

Link copied to clipboard
public void addUnreadNewMessage(UiMessage message)
Link copied to clipboard
public void bindConversation(ConversationIdentifier conversationIdentifier, Bundle bundle)
Link copied to clipboard
public void cleanUnreadNewCount()
Link copied to clipboard
public void cleanUnreadStatus()
清理未读状态
Link copied to clipboard
public void enterEditState()
启动编辑模式
Link copied to clipboard
public void executePageEvent(PageEvent pageEvent)
Link copied to clipboard
public void executePostPageEvent(PageEvent pageEvent)
异步线程切换到主线程执行
Link copied to clipboard
public boolean filterMessageToHideNewMessageBar(UiMessage uiMessage)
过滤只存储不计数消息,使其不显示聊天页面右下角新消息气泡UI.
Link copied to clipboard
public int findPositionByMessageId(int messageId)
Link copied to clipboard
public int findPositionBySendTime(long sentTime)
Link copied to clipboard
public UiMessage findUIMessage(int messageId)
public UiMessage findUIMessage(String messageUId)
Link copied to clipboard
public void forwardMessage(Intent data)
Link copied to clipboard
public ConversationIdentifier getConversationIdentifier()
Link copied to clipboard
public ConversationType getCurConversationType()
Link copied to clipboard
public String getCurTargetId()
Link copied to clipboard
public Message getFirstUnreadMessage()
Link copied to clipboard
public LiveData<Integer> getHistoryMessageUnreadLiveData()
Link copied to clipboard
public long getLoadMoreSentTime()
Link copied to clipboard
public LiveData<Integer> getNewMentionMessageUnreadLiveData()
Link copied to clipboard
public MediatorLiveData<Integer> getNewMessageUnreadLiveData()
Link copied to clipboard
public List<Message> getNewUnReadMentionMessages()
Link copied to clipboard
public List<UiMessage> getNewUnReadMessages()
Link copied to clipboard
public MediatorLiveData<PageEvent> getPageEventLiveData()
Link copied to clipboard
public int getRefreshMessageId()
Link copied to clipboard
public long getRefreshSentTime()
Link copied to clipboard
public List<UiMessage> getSelectedUiMessages()
Link copied to clipboard
public LiveData<List<UiMessage>> getUiMessageLiveData()
Link copied to clipboard
public List<UiMessage> getUiMessages()
Link copied to clipboard
public void hideHistoryBar()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public MediatorLiveData<Boolean> IsEditStatusLiveData()
Link copied to clipboard
public boolean isForegroundActivity()
Link copied to clipboard
public boolean isHistoryState()
Link copied to clipboard
Link copied to clipboard
public boolean isInitUnreadMessageFinish()
Link copied to clipboard
public boolean isNormalState()
Link copied to clipboard
public boolean isRemoteMessageLoadFinish()
Link copied to clipboard
public boolean isScrollToBottom()
Link copied to clipboard
public UiMessage mapUIMessage(Message message)
Link copied to clipboard
Link copied to clipboard
public void newMessageBarClick()
Link copied to clipboard
public void onAudioClick(UiMessage uiMessage)
Link copied to clipboard
public boolean onBackPressed()
Link copied to clipboard
public void onClearMessages(ClearEvent event)
Link copied to clipboard
public void onDeleteMessage(DeleteEvent event)
Link copied to clipboard
public void onDestroy()
Link copied to clipboard
public void onDownloadMessage(DownloadEvent event)
Link copied to clipboard
public void onExistUnreadMessage(Conversation conversation, int unreadMessageCount)
Link copied to clipboard
public void onGetHistoryMessage(List<Message> messages)
public void onGetHistoryMessage(List<Message> messages, boolean isHasMoreMsg)
初始化加载本地消息 下拉加载历史消息
Link copied to clipboard
public void onGroupUpdate(Group group)
Link copied to clipboard
public void onGroupUserInfoUpdate(GroupUserInfo groupUserInfo)
Link copied to clipboard
public void onInsertMessage(InsertEvent event)
Link copied to clipboard
public void onItemClick(UiMessage uiMessage)
Link copied to clipboard
public boolean onItemLongClick(UiMessage uiMessage)
Link copied to clipboard
public void onLoadMore()
Link copied to clipboard
public void onLoadMoreMessage(List<Message> messages)
上拉加载更多消息
Link copied to clipboard
public void onPause()
Link copied to clipboard
public void onReadReceiptRequestClick(UiMessage uiMessage)
Link copied to clipboard
public void onReadReceiptStateClick(UiMessage uiMessage)
Link copied to clipboard
public void onRecallEvent(RecallEvent event)
Link copied to clipboard
public void onReEditClick(UiMessage uiMessage)
Link copied to clipboard
public void onRefresh()
Link copied to clipboard
public void onRefreshEvent(RefreshEvent event)
Link copied to clipboard
public void onReloadMessage(List<Message> messages)
normal状态点击历史消息bar history状态点击新消息bar
Link copied to clipboard
public void onResume()
Link copied to clipboard
public void onScrolled(RecyclerView recyclerView, int dx, int dy, int headerCount, int footerCount)
Link copied to clipboard
public void onSendMediaMessage(SendMediaEvent event)
Link copied to clipboard
public void onSendMessage(SendEvent event)
Link copied to clipboard
public void onStop()
Link copied to clipboard
public void onTranslationResult(int code, RCTranslationResultWrapper result)
Link copied to clipboard
public void onUserPortraitClick(Context context, ConversationType conversationType, UserInfo userInfo, String targetId)
Link copied to clipboard
public boolean onUserPortraitLongClick(Context context, ConversationType conversationType, UserInfo userInfo, String targetId)
Link copied to clipboard
public void onUserUpdate(UserInfo user)
Link copied to clipboard
public void onViewClick(int clickType, UiMessage data)
Link copied to clipboard
public boolean onViewLongClick(int clickType, UiMessage data)
Link copied to clipboard
public void onWarnClick(UiMessage uiMessage)
Link copied to clipboard
Link copied to clipboard
public void processNewMessageUnread(boolean isMainThread)
Link copied to clipboard
public void quitEditMode()
退出编辑模式
Link copied to clipboard
public void refreshAllMessage()
public void refreshAllMessage(boolean force)
Link copied to clipboard
public void refreshSingleMessage(UiMessage uiMessage)
Link copied to clipboard
public void removeUIMessage(int messageId)
Link copied to clipboard
public void reSendMessage(Message message)
Link copied to clipboard
public void setFirstUnreadMessage(Message firstUnreadMessage)
Link copied to clipboard
public void setInitMentionedMessageFinish(boolean initMentionedMessageFinish)
Link copied to clipboard
public void setInitUnreadMessageFinish(boolean initUnreadMessageFinish)
Link copied to clipboard
public void setNewUnReadMentionMessages(List<Message> newUnReadMentionMessages)
Link copied to clipboard
public void setRemoteMessageLoadFinish(boolean remoteMessageLoadFinish)
Link copied to clipboard
public void setScrollToBottom(boolean scrollToBottom)
Link copied to clipboard
public void showHistoryBar(int unreadMessageCount)
Link copied to clipboard
public void showNewMentionMessageBar(int unreadMessageCount)
Link copied to clipboard
public void stopPlay()
Link copied to clipboard
Link copied to clipboard
public void unreadBarClick()
Link copied to clipboard
public void updateMentionMessage(Message message)
Link copied to clipboard