修复userlist可能为空的问题
This commit is contained in:
parent
07d6b959d5
commit
6eba9558e1
@ -697,7 +697,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
if (mLivePlayViewHolder != null && data.getEnterRoomInfo().getIsconnection() != null && data.getEnterRoomInfo().getIsconnection().equals("1")) {
|
if (mLivePlayViewHolder != null && data.getEnterRoomInfo().getIsconnection() != null && data.getEnterRoomInfo().getIsconnection().equals("1")) {
|
||||||
JSONArray array = pkInfo.getJSONArray("userlist");
|
JSONArray array = pkInfo.getJSONArray("userlist");
|
||||||
//判断是否是多人连麦
|
//判断是否是多人连麦
|
||||||
if (array.size() > 0) {//多人連麥
|
if (array!=null&& !array.isEmpty()) {//多人連麥
|
||||||
if (mLivePlayViewHolder != null) {
|
if (mLivePlayViewHolder != null) {
|
||||||
List<DrPkbean> drPkbeans = new ArrayList<>();
|
List<DrPkbean> drPkbeans = new ArrayList<>();
|
||||||
for (int j = 0; j < array.size(); j++) {
|
for (int j = 0; j < array.size(); j++) {
|
||||||
@ -783,6 +783,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
if (mLivePlayViewHolder != null) {
|
if (mLivePlayViewHolder != null) {
|
||||||
JSONArray array = pkInfo.getJSONArray("userlist");
|
JSONArray array = pkInfo.getJSONArray("userlist");
|
||||||
|
if(array==null){
|
||||||
|
array=new JSONArray();
|
||||||
|
}
|
||||||
List<DrPkbean> drPkbeans = new ArrayList<>();
|
List<DrPkbean> drPkbeans = new ArrayList<>();
|
||||||
for (int j = 0; j < array.size(); j++) {
|
for (int j = 0; j < array.size(); j++) {
|
||||||
UserBean userBean = new UserBean();
|
UserBean userBean = new UserBean();
|
||||||
@ -2379,7 +2382,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
* @param time
|
* @param time
|
||||||
*/
|
*/
|
||||||
public void upDataPkScore(JSONArray pkScores, int time) {
|
public void upDataPkScore(JSONArray pkScores, int time) {
|
||||||
L.eSw("upDataPkScore" + time);
|
L.eSw("upDataPkScore" + time+"|"+pkScores);
|
||||||
|
if(pkScores==null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.pkScores = pkScores;
|
this.pkScores = pkScores;
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
String liveId = mLiveBean.getUid();
|
String liveId = mLiveBean.getUid();
|
||||||
|
Loading…
Reference in New Issue
Block a user