From 823f534dff0da0b34f68e32cdfe2651d1bb81db3 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 12 七月 2023 17:16:40 +0800 Subject: [PATCH] 2023年07月12日17:16:39 --- app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java index a0ca15f..40df325 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java @@ -407,7 +407,7 @@ @Override public void onSuccess(List<CloudInverterDeviceBean> list) { if (list == null || list.size() == 0) { -// //浜戠娌℃湁缁戝畾閫嗗彉鍣�,娓呯┖鏈湴鍒楄〃; +// //浜戠娌℃湁缁戝畾閫嗗彉鍣�,浠ユ湰鍦颁负涓�; // HDLLinkLocalGateway.getInstance().getGatewayList().clear(); if (cloudCallBeak != null) { cloudCallBeak.onSuccess(true); @@ -451,18 +451,13 @@ HdlDeviceLogic.getInstance().getCloudInverterDeviceList(UserConfigManage.getInstance().getHomeId(), new CloudCallBeak<List<CloudInverterDeviceBean>>() { @Override public void onSuccess(List<CloudInverterDeviceBean> list) { - if (list == null) { + if (list == null || list.size() == 0) { if (cloudCallBeak != null) { cloudCallBeak.onSuccess(true); } return; } - if (list.size() <= 0) { - if (cloudCallBeak != null) { - cloudCallBeak.onSuccess(true); - } - return; - } + //娓呮鏈湴缃戝叧鍒楄〃 HDLLinkLocalGateway.getInstance().getGatewayList().clear(); for (int i = 0; i < list.size(); i++) { CloudInverterDeviceBean cloudInverterDeviceBean = list.get(i); @@ -475,6 +470,7 @@ gatewayBean.setHomeId(UserConfigManage.getInstance().getHomeId()); gatewayBean.setLocalEncrypt(true); gatewayBean.setMaster("true"); + //娣诲姞缃戝叧 HDLLinkLocalGateway.getInstance().getGatewayList().add(gatewayBean); } if (cloudCallBeak != null) { -- Gitblit v1.8.0