mac
2024-03-15 a0e8f81afc4fe2a21a5c504d53e569ea50d463d6
app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java
@@ -11,8 +11,6 @@
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonObject;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.photovoltaic.R;
@@ -117,7 +115,8 @@
                    @Override
                    public void onSuccess(Boolean obj) {
                        hideLoading();
                        loadNextPageMessageList(1, true, mFilterKye, mFilterValue);
                        HdlMessageLogic.getInstance().setAllRead(true);
                        updateListData();
                    }
                    @Override
@@ -322,7 +321,7 @@
        } else {
            messageStateType = MessageStateType.processed;
        }
        HdlMessageLogic.getInstance().getPageNoMessageList_C(pageNo, messageStateType, filter_key, filter_value, new CloudCallBeak<HdlMessageLogic.MessageListClass>() {
        HdlMessageLogic.getInstance().getPageNoMessageList_C(UserConfigManage.getInstance().getHomeId(), pageNo, messageStateType, filter_key, filter_value, new CloudCallBeak<HdlMessageLogic.MessageListClass>() {
            @Override
            public void onSuccess(HdlMessageLogic.MessageListClass messageListClass) {
                if (messageListClass != null) {
@@ -355,42 +354,6 @@
        });
    }
    /**
     * 读取消息【未读数量】
     */
    private void getUnreadCount() {
        HdlMessageLogic.getInstance().getMessageUntreatedCount(new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String data) {
                HdlThreadLogic.runMainThread(new Runnable() {
                    @Override
                    public void run() {
                        JSONObject jsonObject = JSON.parseObject(data);
                        if (jsonObject.containsKey("untreatedCount")) {
                            //未处理数量
                            String untreatedCount = jsonObject.getString("untreatedCount");
                            refreshCount();
                        }
                        if (jsonObject.containsKey("unreadCount")) {
                            //未读数量
                            String unreadCount = jsonObject.getString("unreadCount");
                        }
                    }
                });
            }
            @Override
            public void onFailure(HDLException e) {
                TextView textView = _mActivity.findViewById(R.id.my_message_bottom_il2).findViewById(R.id.red_count_tv);
                if (textView != null) {
                    textView.setVisibility(View.GONE);
                }
            }
        });
    }