| | |
| | | import com.hdl.photovoltaic.other.HdlThreadLogic; |
| | | import com.hdl.photovoltaic.other.HdlUniLogic; |
| | | import com.hdl.photovoltaic.ui.bean.MessageBean; |
| | | import com.hdl.photovoltaic.ui.bean.UnCountBean; |
| | | import com.hdl.photovoltaic.ui.message.MessageInfoActivity; |
| | | import com.hdl.photovoltaic.ui.newC.adapter.MessageCenterListAdapter; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | |
| | | initView(); |
| | | //初始化界面监听器 |
| | | initEvent(); |
| | | getUnreadCount(); |
| | | //进来读取一次数据(为了更新currentPage,currentTotal这个值) |
| | | loadNextPageMessageList(1, true, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | protected void onResume() { |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 读取消息【未读数量,未处理总数量,已处理总数量】 |
| | | */ |
| | | private void getUnreadCount() { |
| | | HdlMessageLogic.getInstance().getMessageUntreatedCount(UserConfigManage.getInstance().getHomeId(), new CloudCallBeak<UnCountBean>() { |
| | | @Override |
| | | public void onSuccess(UnCountBean unCountBean) { |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if (unCountBean == null) { |
| | | return; |
| | | } |
| | | mTotalCount1 = unCountBean.getUntreatedCount(); |
| | | mTotalCount2 = unCountBean.getProcessedCount(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Subscribe(threadMode = ThreadMode.MAIN, sticky = true) |
| | | public void onEventMessage(BaseEventBus eventBus) { |