修复IM消息获取getUserBean.getId()为空导致的问题
This commit is contained in:
parent
718d4a5d2f
commit
23be58c4e8
@ -130,17 +130,22 @@ public class SocketRyClient {
|
||||
if (mListener == null) {
|
||||
return;
|
||||
}
|
||||
switch (msg.what) {
|
||||
case Constants.SOCKET_WHAT_CONN:
|
||||
mListener.onConnect((Boolean) msg.obj);
|
||||
break;
|
||||
case Constants.SOCKET_WHAT_BROADCAST:
|
||||
processBroadcast((String) msg.obj);
|
||||
break;
|
||||
case Constants.SOCKET_WHAT_DISCONN:
|
||||
mListener.onDisConnect();
|
||||
break;
|
||||
try {
|
||||
switch (msg.what) {
|
||||
case Constants.SOCKET_WHAT_CONN:
|
||||
mListener.onConnect((Boolean) msg.obj);
|
||||
break;
|
||||
case Constants.SOCKET_WHAT_BROADCAST:
|
||||
processBroadcast((String) msg.obj);
|
||||
break;
|
||||
case Constants.SOCKET_WHAT_DISCONN:
|
||||
mListener.onDisConnect();
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -211,7 +216,7 @@ public class SocketRyClient {
|
||||
break;
|
||||
}
|
||||
UserBean us = CommonAppConfig.getInstance().getUserBean();
|
||||
if (map.getString("uid") != null && map.getString("uid").equals(us.getId())) {
|
||||
if (map.getString("uid") != null && us != null && map.getString("uid").equals(us.getId())) {
|
||||
int num = LiveAudienceActivity.fansNum + 1;
|
||||
LiveRoomViewHolder.setFansNum(num);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user