mac
2024-03-14 969a251801a4553920b799ba9be0fcb9e69e47ed
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;
@@ -357,41 +355,7 @@
    }
    /**
     * 读取消息【未读数量】
     */
    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);
                }
            }
        });
    }
    @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)