fix [跨设备已读消息依旧推送问题]

This commit is contained in:
zlzw 2024-03-26 16:43:34 +08:00
parent 7c669b338f
commit 99bbffed21

View File

@ -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) {