fix [跨设备已读消息依旧推送问题]
This commit is contained in:
parent
7c669b338f
commit
99bbffed21
@ -284,10 +284,25 @@ public class AppContext extends CommonAppContext {
|
||||
if (message.getReceivedStatus().isRead()) {
|
||||
return false;
|
||||
}
|
||||
MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity()
|
||||
, message.getTargetId(),
|
||||
content.getContent()
|
||||
);
|
||||
|
||||
RongIMClient.getInstance().getUnreadCount(Conversation.ConversationType.PRIVATE, message.getTargetId(), new RongIMClient.ResultCallback<Integer>() {
|
||||
@Override
|
||||
public void onSuccess(Integer integer) {
|
||||
if (integer > 0) {
|
||||
MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity()
|
||||
, message.getTargetId(),
|
||||
content.getContent()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(RongIMClient.ErrorCode e) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user