From afb62b49b79a31ab62a548f9cef672dfc9bae16f Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 09 四月 2025 09:04:38 +0800 Subject: [PATCH] 2025年04月09日09:04:34 --- app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 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 cf54d91..476ebb8 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 @@ -3,7 +3,6 @@ import android.content.DialogInterface; import android.content.Intent; -import android.graphics.Typeface; import android.os.Bundle; import android.view.View; import android.widget.TextView; @@ -30,6 +29,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; @@ -87,17 +87,19 @@ @Override public void onBindView(Bundle savedInstanceState) { - setNotificationBarBackgroundColor(CustomColor.white); - setStatusBarTextColor(); + setStatusBarTranslucent(); + getWindow().setNavigationBarColor(getColor(R.color.text_FF1C1C1E)); //鍒濆鍖栨暟鎹� initData(); //鍒濆鍖� initView(); //鍒濆鍖栫晫闈㈢洃鍚櫒 initEvent(); + getUnreadCount(); //杩涙潵璇诲彇涓�娆℃暟鎹�(涓轰簡鏇存柊currentPage锛宑urrentTotal杩欎釜鍊�) loadNextPageMessageList(1, true, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue); } + @Override protected void onResume() { @@ -329,7 +331,7 @@ viewBinding.toolbarTopMessageCenterListRl.topBackLl.setVisibility(View.VISIBLE); viewBinding.toolbarTopMessageCenterListRl.topTitleTv.setText(R.string.set_message_center); viewBinding.toolbarTopMessageCenterListRl.topMoreBtn.setVisibility(View.VISIBLE); - viewBinding.toolbarTopMessageCenterListRl.topMoreIv.setImageResource(R.drawable.clearall); + viewBinding.toolbarTopMessageCenterListRl.topMoreIv.setImageResource(R.drawable.clear_all); //榛樿閫変腑鍏ㄩ儴璁惧 viewBinding.allDeviceTitleIv.setBackgroundResource(R.drawable.down); viewBinding.allGradeTitleIv.setBackgroundResource(R.drawable.down); @@ -431,12 +433,37 @@ if (isShowLoading) { hideLoading(); } + HdlThreadLogic.toast(_mActivity, e.getMsg() + "(" + e.getCode() + ")"); } }); } + /** + * 璇诲彇娑堟伅銆愭湭璇绘暟閲�,鏈鐞嗘�绘暟閲忥紝宸插鐞嗘�绘暟閲忋�� + */ + 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