From cdcd08459665a89844a14c1d376995ebc501e018 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期三, 22 五月 2024 16:23:49 +0800 Subject: [PATCH] 2024年05月22日16:23:47 --- app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java index 507e362..0563f1e 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java @@ -23,6 +23,7 @@ import com.hdl.photovoltaic.databinding.FragmentHouseListBinding; import com.hdl.photovoltaic.base.CustomBaseFragment; import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; +import com.hdl.photovoltaic.enums.LowerTagType; import com.hdl.photovoltaic.enums.PowerStationStatus; import com.hdl.photovoltaic.enums.ShowErrorMode; import com.hdl.photovoltaic.enums.SortType; @@ -300,10 +301,11 @@ public void onDelClick(int position, HouseIdBean houseIdBean) { DelayedConfirmationCancelDialog delayedConfirmationCancelDialog = new DelayedConfirmationCancelDialog(_mActivity); - delayedConfirmationCancelDialog.setTitleContent(getString(R.string.loading_title_tip)); + delayedConfirmationCancelDialog.show(); + delayedConfirmationCancelDialog.isHideTitle(true); String homeName = "\"" + houseIdBean.getHomeName() + "\""; delayedConfirmationCancelDialog.setContent(getString(R.string.delete_power_station).replace("%s", homeName)); - delayedConfirmationCancelDialog.show(); + delayedConfirmationCancelDialog.startCountdown(4); delayedConfirmationCancelDialog.setYesOnclickListener(new DelayedConfirmationCancelDialog.onYesOnclickListener() { @Override @@ -596,15 +598,20 @@ } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE.equals(eventBus.getType())) { // 鍙栨秷绮樻�т簨浠� EventBus.getDefault().removeStickyEvent(eventBus); - //uin鍏抽棴浣忓畢璇︽儏鐣岄潰閫氱煡 - if (MqttRecvClient.getInstance() != null) { - MqttRecvClient.getInstance().removeAllTopic(); + //鏄湪鐢电珯鍒楄〃椤垫墠杩涙潵杩欓噷 + if (HdlCommonLogic.lowerTagType == LowerTagType.power_station && isClickPowerStationLabel) { + //uin鍏抽棴浣忓畢璇︽儏鐣岄潰閫氱煡 + if (MqttRecvClient.getInstance() != null) { + MqttRecvClient.getInstance().removeAllTopic(); + } + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); } - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); - } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) { // 鍙栨秷绮樻�т簨浠� EventBus.getDefault().removeStickyEvent(eventBus); +// if (!isClickPowerStationLabel) { +// return; +// } //杩涘幓浣忓畢璇︽儏uni璇诲彇閫嗗彉鍣ㄥ垪琛ㄦ垚鍔熷悗閫氱煡 for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId()).size(); i++) { String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId()).get(i).getGatewayId(); -- Gitblit v1.8.0