调整中英文
调整开播频道接口
This commit is contained in:
parent
57bda40a82
commit
e89e82483b
@ -185,6 +185,7 @@ public class Constants {
|
||||
public static final String LIVE_PK_END = "endPK";//结束PK,以这个PK获取到的参数为准
|
||||
public static final String RED_PACKET = "RedPacket";//红包通知
|
||||
public static final String RED_PACKET_SUPER_JACKPOT = "RedPacketSuperJackpot";//超级红包通知
|
||||
public static final String SOCKET_LIVE_MSG_TO_USER = "SendMsgToUser";//七日用户主播提示语
|
||||
|
||||
//游戏socket
|
||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||
|
@ -6,6 +6,7 @@ import static com.yunbao.live.bean.LiveChatBean.LUCKY_ANGEL;
|
||||
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
||||
import static com.yunbao.live.bean.LiveChatBean.STAR_CHALLENGE_UPGRADE_NOTIFY;
|
||||
import static com.yunbao.live.bean.LiveChatBean.SYSTEM3_COLOR;
|
||||
import static com.yunbao.live.bean.LiveChatBean.TYPE_TO_USER_MSG;
|
||||
import static com.yunbao.live.bean.LiveChatBean.WISH_LIST_PROGRESS;
|
||||
import static com.yunbao.live.bean.LiveChatBean.XYD_COMPLETE;
|
||||
|
||||
@ -391,7 +392,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);
|
||||
mTextView.setText(bean.getContent());
|
||||
}
|
||||
} else if (bean.getType() == LiveChatBean.SYSTEM2) {
|
||||
} else if (bean.getType() == LiveChatBean.SYSTEM2 || bean.getType()==TYPE_TO_USER_MSG) {
|
||||
mTextView.setTextColor(Color.parseColor("#ffffff"));
|
||||
new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);
|
||||
mTextView.setText(bean.getContent());
|
||||
@ -530,6 +531,10 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
if(bean.getType()==LiveChatBean.TYPE_TO_USER_MSG
|
||||
&&!CommonAppConfig.getInstance().getUid().equals(bean.getAtUserID())){
|
||||
return;
|
||||
}
|
||||
// Log.i(TAG, "insertItem: " + bean.getContent()+" size = "+(mList.size()+1));
|
||||
int size = mList.size();
|
||||
//设置最大展示99条消息
|
||||
@ -551,7 +556,9 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.NEW_MESSAGE_REMINDER));
|
||||
|
||||
if (bean.getAtUserID() != null && bean.getAtUserID().contains(String.valueOf(model.getId()))) {
|
||||
if (bean.getType() != LiveChatBean.TYPE_TO_USER_MSG &&
|
||||
bean.getAtUserID() != null
|
||||
&& bean.getAtUserID().contains(String.valueOf(model.getId()))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.AT_MESSAGE));
|
||||
mPosition = size;
|
||||
|
@ -27,6 +27,7 @@ public class LiveChatBean {
|
||||
public static final int XYD_COMPLETE = 207;//心愿单完成通知
|
||||
public static final int WISH_LIST_PROGRESS = 307;//心愿单进度通知
|
||||
public static final int BLIND_BOX = 409;//盲盒礼物消息
|
||||
public static final int TYPE_TO_USER_MSG=500;//指定信息
|
||||
|
||||
|
||||
private String id;
|
||||
|
@ -2,6 +2,7 @@ package com.yunbao.live.socket;
|
||||
|
||||
import static com.blankj.utilcode.util.SnackbarUtils.dismiss;
|
||||
import static com.blankj.utilcode.util.ViewUtils.runOnUiThread;
|
||||
import static com.yunbao.common.Constants.SOCKET_LIVE_MSG_TO_USER;
|
||||
import static com.yunbao.live.activity.LiveRyAnchorActivity.isDRPK;
|
||||
import static com.yunbao.live.views.LiveRoomViewHolder.getIsHot;
|
||||
|
||||
@ -729,6 +730,9 @@ public class SocketRyClient {
|
||||
.setNewNumber(map.getInteger("new_number"))
|
||||
.setMaxNumber(map.getInteger("max_number")));
|
||||
break;
|
||||
case SOCKET_LIVE_MSG_TO_USER:
|
||||
sendToUserMsg(map);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
@ -830,6 +834,18 @@ public class SocketRyClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 七日留存新用户主播端弹幕显示接口
|
||||
*/
|
||||
private void sendToUserMsg(JSONObject map) {
|
||||
LiveChatBean bean = new LiveChatBean();
|
||||
bean.setId(CommonAppConfig.getInstance().getUid());
|
||||
bean.setAtUserID(map.getString("toUserID"));
|
||||
bean.setContent(map.getString("ct"));
|
||||
bean.setType(LiveChatBean.TYPE_TO_USER_MSG);
|
||||
mListener.onChat(bean, 1);
|
||||
}
|
||||
|
||||
private void wordLightEnterRoom(JSONObject map, SocketReceiveBean received) {
|
||||
String msgtype = map.getString("msgtype");
|
||||
if ("2".equals(msgtype)) {//发言,点亮
|
||||
|
Loading…
Reference in New Issue
Block a user