mac
2023-10-09 a59bbb7890e107a681f677765f2600e278c06a0d
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseListFragment.java
@@ -12,6 +12,8 @@
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.bean.BaseEventBus;
@@ -109,7 +111,7 @@
            @Override
            public void onClick(int position, HouseIdBean houseIdBean) {
                //点击住宅详情
                HdlLogLogic.print("====点击住宅详情" + position);
                HdlLogLogic.print("点击住宅详情===" + new Gson().toJson(houseIdBean));
                HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
                String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS + "?homeId=" + houseIdBean.getHomeId();
                HdlUniLogic.getInstance().openUniMP(path, null);
@@ -145,6 +147,12 @@
        //收到EventBUs通知
        if (ConstantManage.EVENTBUS_POST_HOME_CREATED.equals(eventBus.getType())) {
            updateUIData(false);
            if (eventBus.getData() != null) {
                Gson gson = new Gson();
                String json = eventBus.getData().toString();
                HouseIdBean houseIdBean = gson.fromJson(json, HouseIdBean.class);
                HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
            }
        }
    }
@@ -173,6 +181,7 @@
                                houseInfoAdapter.setList(list);
                                houseInfoAdapter.notifyDataSetChanged();
                            }
                        }
                    }
                }, _mActivity, ShowErrorMode.YES);