From 3bd4301cda22d51ff75542ee5af051b02deb4984 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 28 Nov 2022 16:36:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E9=97=B4@?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20userlistModels=E4=B8=BA=E7=A9=BA=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/OlineListActivity.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/views/OlineListActivity.java b/live/src/main/java/com/yunbao/live/views/OlineListActivity.java index bffc3ee67..234afcd59 100644 --- a/live/src/main/java/com/yunbao/live/views/OlineListActivity.java +++ b/live/src/main/java/com/yunbao/live/views/OlineListActivity.java @@ -79,12 +79,14 @@ public class OlineListActivity extends AbsActivity { List audiencelistModels = new ArrayList<>(); List>> mapList = new ArrayList<>(); //讲贵族前置顺序 - for (OlineUserlistModel model : userlistModels) { - int nobleId = Integer.parseInt(model.getNobleId()); - if (nobleId > 0) { - noblelistModels.add(model); - } else { - audiencelistModels.add(model); + if (userlistModels != null) { + for (OlineUserlistModel model : userlistModels) { + int nobleId = Integer.parseInt(model.getNobleId()); + if (nobleId > 0) { + noblelistModels.add(model); + } else { + audiencelistModels.add(model); + } } } Map> noblerMap = new HashMap<>();