diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index a98655d52..414d111f3 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -323,14 +323,14 @@ public class AppContext extends CommonAppContext { JSONObject map = received.getMsg().getJSONObject(0); sendStartAnchorLive(map); } else if (message.getTargetId().contains("v")) { - String contentJson = ((TextMessage) message.getContent()).getContent(); + /*String contentJson = ((TextMessage) message.getContent()).getContent(); Log.e("wewe", contentJson); SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class); if (sudGameSocketImEvent.getMsg().isEmpty()) { return false; } sudGameSocketImEvent.getMsg().get(0).setTime(time); - Bus.get().post(sudGameSocketImEvent); + Bus.get().post(sudGameSocketImEvent);*/ } //主播页面 if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketSwClient.mSocketHandler != null) { diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameSwMicManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameSwMicManager.java index bd3cece8c..8634d6eb7 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameSwMicManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/GameSwMicManager.java @@ -433,7 +433,6 @@ public class GameSwMicManager { }); } - String lastTime = ""; /** * 处理游戏房Im消息 @@ -444,10 +443,7 @@ public class GameSwMicManager { if (msgDTOS.isEmpty()) return; SudGameSocketImEvent.MsgDTO msgDTO = msgDTOS.get(0); - if(lastTime.equals(msgDTO.getTime())){ - return; - } - lastTime = msgDTO.getTime(); + //正常文字消息 if (TextUtils.equals(msgDTO.getMethod(), "SendMsg")) { getView().insertItem(new SudGameChatImModel().setWelcomMessage(false).setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt())); diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java index 43d7438ef..0d17466e2 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java @@ -86,7 +86,7 @@ public class SocketRyChatUtil { if (u == null) { return; } - + System.out.println("融云发言:" + u.getDress().getMedal_new_en()); final SocketSendBean msg = new SocketSendBean() .param("_method_", Constants.SOCKET_SEND_MSG) @@ -104,7 +104,7 @@ public class SocketRyChatUtil { .param("uid", u.getId()) .param("liangname", u.getGoodName()) .param("vip_type", u.getVip().getType()) - .param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType()) + .param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType()) .param("medal_name", u.getMedalName()) .param("medal_level", model.getMedalLevel()) .param("good_num", u.getGoodnum()) diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index f6b19583b..cb6b2340f 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -1007,6 +1007,7 @@ public class SocketRyClient { try { //增加粉丝徽章信息 chatBean.setMedalNmae(map.getString("medal_name")); + chatBean.setMedal_new_en(map.getString("medal_new_en")); FansModel fansMedalBean = new NewLevelManager(mContext).getFansModel(map.getIntValue("medal_level")); if (fansMedalBean != null) chatBean.setMedalLevelImageUrl(fansMedalBean.getThumb()); @@ -1048,7 +1049,7 @@ public class SocketRyClient { chatBean.setBubble(obj.getString("bubble")); chatBean.setMedal(obj.getString("medal")); chatBean.setMedal_new(obj.getString("medal_new")); - chatBean.setMedal_new_en(map.getString("medal_new_en")); + chatBean.setMedal_new_en(obj.getString("medal_new_en")); chatBean.setHot_num(obj.getString("hot_num")); UserBean.DressBean dressBean = new UserBean.DressBean(); dressBean.setAvatar_frame(obj.getString("avatar_frame")); @@ -1069,6 +1070,7 @@ public class SocketRyClient { FansModel fansMedalBean = new NewLevelManager(mContext).getFansModel(map.getIntValue("medal_level")); u.setFansLevel(obj.getIntValue("medal_level")); u.setFansEnterRoomUrl(obj.getString("medal_backgroup_thumb")); + CommonAppConfig.getInstance().getUserBean().getDress().setMedal_new_en(obj.getString("medal_new_en")); if (fansMedalBean != null) chatBean.setMedalLevelImageUrl(fansMedalBean.getThumb()); mListener.onEnterRoom(new LiveEnterRoomBean(u, chatBean)); @@ -1395,7 +1397,7 @@ public class SocketRyClient { private void processAnchorLinkMicPk(JSONObject map) { int action = map.getIntValue("action"); Log.i("Socket", "action = " + action + " json = " + map.toString()); - L.eSw("RY RY RY RY "+map.toString()); + L.eSw("RY RY RY RY " + map.toString()); switch (action) { case 1://收到对方主播PK回调 UserBean u = new UserBean(); diff --git a/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java index 0efeb8a44..f193d2724 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketSwChatUtil.java @@ -85,7 +85,7 @@ public class SocketSwChatUtil { if (u == null) { return; } - + System.out.println("声网发言:" + u.getDress().getMedal_new_en()); final SocketSendBean msg = new SocketSendBean() .param("_method_", Constants.SOCKET_SEND_MSG) @@ -99,6 +99,7 @@ public class SocketSwChatUtil { .param("medal_honor", u.getMedal_no_display_src()) .param("medal", u.getDress().getMedal()) .param("medal_new", u.getDress().getMedal_new()) + .param("medal_new_en", u.getDress().getMedal_new_en()) .param("uid", u.getId()) .param("liangname", u.getGoodName()) .param("vip_type", u.getVip().getType()) @@ -180,6 +181,7 @@ public class SocketSwChatUtil { .param("bubble", u.getDress().getBubble()) .param("medal", u.getDress().getMedal()) .param("medal_new", u.getDress().getMedal_new()) + .param("medal_new_en", u.getDress().getMedal_new_en()) .param("guard_type", IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getGuardType()) .param("medal_name", u.getMedalName()) .param("medal_level", u.getMedalLevel()) diff --git a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java index 16f6c2eb1..76cd96cf1 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java @@ -913,6 +913,7 @@ public class SocketSwClient { try { //增加粉丝徽章信息 chatBean.setMedalNmae(map.getString("medal_name")); + chatBean.setMedal_new_en(map.getString("medal_new_en")); FansModel fansMedalBean = new NewLevelManager(mContext).getFansModel(map.getIntValue("medal_level")); if (fansMedalBean != null) chatBean.setMedalLevelImageUrl(fansMedalBean.getThumb()); @@ -954,6 +955,7 @@ public class SocketSwClient { chatBean.setBubble(obj.getString("bubble")); chatBean.setMedal(obj.getString("medal")); chatBean.setMedal_new(obj.getString("medal_new")); + chatBean.setMedal_new_en(obj.getString("medal_new_en")); chatBean.setHot_num(obj.getString("hot_num")); UserBean.DressBean dressBean = new UserBean.DressBean(); dressBean.setAvatar_frame(obj.getString("avatar_frame")); @@ -971,6 +973,7 @@ public class SocketSwClient { //增加粉丝徽章信息 chatBean.setMedalNmae(obj.getString("medal_name")); chatBean.setUserNiceName(obj.getString("user_nicename"));//名字 + CommonAppConfig.getInstance().getUserBean().getDress().setMedal_new_en(obj.getString("medal_new_en")); FansModel fansMedalBean = new NewLevelManager(mContext).getFansModel(map.getIntValue("medal_level")); u.setFansLevel(obj.getIntValue("medal_level")); u.setFansEnterRoomUrl(obj.getString("medal_backgroup_thumb"));