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 | 43 ++++++++++++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 13 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 89c0804..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;
@@ -87,17 +88,19 @@
@Override
public void onBindView(Bundle savedInstanceState) {
- setNotificationBarBackgroundColor(CustomColor.white);
- setStatusBarTextColor();
+ setStatusBarTranslucent();
+ getWindow().setNavigationBarColor(getColor(R.color.text_FF333738));
//鍒濆鍖栨暟鎹�
initData();
//鍒濆鍖�
initView();
//鍒濆鍖栫晫闈㈢洃鍚櫒
initEvent();
+ getUnreadCount();
//杩涙潵璇诲彇涓�娆℃暟鎹�(涓轰簡鏇存柊currentPage锛宑urrentTotal杩欎釜鍊�)
loadNextPageMessageList(1, true, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue);
}
+
@Override
protected void onResume() {
@@ -326,9 +329,7 @@
}
private void initView() {
- viewBinding.toolbarTopMessageCenterListRl.getRoot().setBackgroundColor(getColor(R.color.text_FFECECEC));
viewBinding.toolbarTopMessageCenterListRl.topBackLl.setVisibility(View.VISIBLE);
- viewBinding.toolbarTopMessageCenterListRl.topLeftIv.setImageResource(R.drawable.back_c);
viewBinding.toolbarTopMessageCenterListRl.topTitleTv.setText(R.string.set_message_center);
viewBinding.toolbarTopMessageCenterListRl.topMoreBtn.setVisibility(View.VISIBLE);
viewBinding.toolbarTopMessageCenterListRl.topMoreIv.setImageResource(R.drawable.clearall);
@@ -342,7 +343,7 @@
viewBinding.messageContentRl.setLayoutManager(mLayoutManager);
viewBinding.messageContentRl.setAdapter(messageCenterListAdapter);
messageCenterListAdapter.setList(mList);
- this.nullDataUpdateUi();
+// this.nullDataUpdateUi();
}
private void initData() {
@@ -439,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) {
@@ -498,19 +523,11 @@
@Override
public void run() {
if (typeClick) {
- viewBinding.messageBottomAlarmDeviceTitleTv.setTextColor(getColor(R.color.text_191919));
viewBinding.messageBottomAlarmDeviceLineV.setVisibility(View.VISIBLE);
- viewBinding.messageBottomAlarmRecordTitleTv.setTextColor(getColor(R.color.text_B2B2B2));
viewBinding.messageBottomAlarmRecordLineV.setVisibility(View.GONE);
- viewBinding.messageBottomAlarmDeviceTitleTv.setTypeface(null, Typeface.BOLD);
- viewBinding.messageBottomAlarmRecordTitleTv.setTypeface(null, Typeface.NORMAL);
} else {
- viewBinding.messageBottomAlarmDeviceTitleTv.setTextColor(getColor(R.color.text_B2B2B2));
viewBinding.messageBottomAlarmDeviceLineV.setVisibility(View.GONE);
- viewBinding.messageBottomAlarmRecordTitleTv.setTextColor(getColor(R.color.text_191919));
viewBinding.messageBottomAlarmRecordLineV.setVisibility(View.VISIBLE);
- viewBinding.messageBottomAlarmDeviceTitleTv.setTypeface(null, Typeface.NORMAL);
- viewBinding.messageBottomAlarmRecordTitleTv.setTypeface(null, Typeface.BOLD);
}
}
--
Gitblit v1.8.0