# UnReadMessageManager

public class UnReadMessageManager

## Types

IUnReadMessageObserver
Link copied to clipboard
public interface IUnReadMessageObserver

## Functions

addForeverObserver
Link copied to clipboard
public void addForeverObserver(Array<ConversationType> conversationTypes, UnReadMessageManager.IUnReadMessageObserver observer)
设置未读消息数变化监听器。 注意:如果是在 activity 中设置,那么要在 activity 销毁时, 调用 removeObserver 否则会造成内存泄漏。
addObserver
Link copied to clipboard
public void addObserver(Array<ConversationType> conversationTypes, UnReadMessageManager.IUnReadMessageObserver observer)
设置未读消息数变化监听器。 注意:如果是在 activity 中设置,那么要在 activity 销毁时, 调用 removeObserver 否则会造成内存泄漏。
clearForeverObserver
Link copied to clipboard
public void clearForeverObserver()
clearObserver
Link copied to clipboard
public void clearObserver()
getInstance
Link copied to clipboard
public static UnReadMessageManager getInstance()
onReceived
Link copied to clipboard
public boolean onReceived(Message message, int left, boolean hasPackage, boolean offline)
onSyncConversationReadStatus
Link copied to clipboard
public void onSyncConversationReadStatus(ConversationType type, String targetId)
removeForeverObserver
Link copied to clipboard
public void removeForeverObserver(UnReadMessageManager.IUnReadMessageObserver observer)
removeObserver
Link copied to clipboard
public void removeObserver(UnReadMessageManager.IUnReadMessageObserver observer)