From 3ccff7173fb73322f7785d8eaedc90a1b5d8765d Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 10 十二月 2024 22:44:03 +0800 Subject: [PATCH] 2024年12月10日22:43:59 --- app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java b/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java index 8228cbc..0267890 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java @@ -30,6 +30,7 @@ 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; @@ -95,9 +96,11 @@ initView(); //鍒濆鍖栫晫闈㈢洃鍚櫒 initEvent(); + getUnreadCount(); //杩涙潵璇诲彇涓�娆℃暟鎹�(涓轰簡鏇存柊currentPage锛宑urrentTotal杩欎釜鍊�) loadNextPageMessageList(1, true, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue); } + @Override protected void onResume() { @@ -437,6 +440,30 @@ } + /** + * 璇诲彇娑堟伅銆愭湭璇绘暟閲�,鏈鐞嗘�绘暟閲忥紝宸插鐞嗘�绘暟閲忋�� + */ + 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) { -- Gitblit v1.8.0