RongIM.getInstance().addUnReadMessageCountChangedObserver(i -> { HHLog.i("Lyb", "unRead===" + i + ""); // i 是未读数量 if (i < 1) { getMsgCountNum().setVisibility(View.GONE); } else if (i < 100) { getMsgCountNum().setVisibility(View.VISIBLE); getMsgCountNum().setText(" " + i + " "); } else { getMsgCountNum().setVisibility(View.VISIBLE); getMsgCountNum().setText("99+"); } }, Conversation.ConversationType.PRIVATE);
融云--监听未读消息数量
最新推荐文章于 2023-03-24 17:43:57 发布