| | |
| | | import com.hdl.photovoltaic.config.ConstantManage; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.ActivityPowerStationsListBinding; |
| | | import com.hdl.photovoltaic.enums.Languages; |
| | | import com.hdl.photovoltaic.enums.ShowErrorMode; |
| | | import com.hdl.photovoltaic.internet.HttpClient; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | |
| | | hideLoading(); |
| | | } |
| | | if (list != null && !list.isEmpty()) { |
| | | if (!comparableList(houseListBeanIDList, list)) { |
| | | //更新缓存 |
| | | HdlResidenceLogic.getInstance().setHouseIdList(list, true); |
| | | if (houseListAdapter != null) { |
| | | //重新获取列表数据 |
| | | initData(); |
| | | refreshDetails(""); |
| | | //更新电站选中状态 |
| | | setSelectState(); |
| | | //更新列表数据 |
| | | houseListAdapter.setList(houseListBeanIDList); |
| | | } |
| | | |
| | | |
| | | // if (!comparableList(houseListBeanIDList, list)) { |
| | | //更新缓存 |
| | | HdlResidenceLogic.getInstance().setHouseIdList(list, true); |
| | | if (houseListAdapter != null) { |
| | | //重新获取列表数据 |
| | | initData(); |
| | | refreshDetails(""); |
| | | //更新电站选中状态 |
| | | setSelectState(); |
| | | //更新列表数据 |
| | | houseListAdapter.setList(houseListBeanIDList); |
| | | } |
| | | // } |
| | | } |
| | | nullDataUpdateUi(list); |
| | | } |
| | |
| | | * @param houseIdBean 选中数据 |
| | | */ |
| | | private void houseSelectionDialog(HouseIdBean houseIdBean) { |
| | | String placeholder = UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.ar) ? "s%" : "%s"; |
| | | ConfirmationCancelDialog dialog = new ConfirmationCancelDialog(this); |
| | | dialog.setTitle(getString(R.string.loading_title_tip)); |
| | | dialog.setContent(getString(R.string.switch_power_station).replace("%s", "\"" + houseIdBean.getHomeName() + "\"")); |
| | | dialog.setContent(getString(R.string.switch_power_station).replace(placeholder, "\"" + houseIdBean.getHomeName() + "\"")); |
| | | dialog.show(); |
| | | dialog.isHideTitle(true); |
| | | dialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() { |