修复直播间@列表 userlistModels为空导致的问题

This commit is contained in:
zlzw 2022-11-28 16:36:20 +08:00
parent 23be58c4e8
commit 3bd4301cda

View File

@ -79,12 +79,14 @@ public class OlineListActivity extends AbsActivity {
List<OlineUserlistModel> audiencelistModels = new ArrayList<>(); List<OlineUserlistModel> audiencelistModels = new ArrayList<>();
List<Map<Integer, List<OlineUserlistModel>>> mapList = new ArrayList<>(); List<Map<Integer, List<OlineUserlistModel>>> mapList = new ArrayList<>();
//讲贵族前置顺序 //讲贵族前置顺序
for (OlineUserlistModel model : userlistModels) { if (userlistModels != null) {
int nobleId = Integer.parseInt(model.getNobleId()); for (OlineUserlistModel model : userlistModels) {
if (nobleId > 0) { int nobleId = Integer.parseInt(model.getNobleId());
noblelistModels.add(model); if (nobleId > 0) {
} else { noblelistModels.add(model);
audiencelistModels.add(model); } else {
audiencelistModels.add(model);
}
} }
} }
Map<Integer, List<OlineUserlistModel>> noblerMap = new HashMap<>(); Map<Integer, List<OlineUserlistModel>> noblerMap = new HashMap<>();