| | |
| | | package com.hdl.photovoltaic.ui.message; |
| | | |
| | | import android.content.Intent; |
| | | import android.os.Bundle; |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | |
| | | import com.hdl.photovoltaic.base.CustomBaseFragment; |
| | | import com.hdl.photovoltaic.config.ConstantManage; |
| | | import com.hdl.photovoltaic.databinding.FragmentMessageAllBinding; |
| | | import com.hdl.photovoltaic.enums.MessageFunctionTabSwitch; |
| | | import com.hdl.photovoltaic.enums.MessageStateType; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlCommonLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | |
| | | messageAllAdapter.setNoOnclickListener(new MessageAdapter.OnclickListener() { |
| | | @Override |
| | | public void onClick(int position, MessageBean item) { |
| | | |
| | | if (position < 0 || position > mList.size()) { |
| | | return; |
| | | } |
| | | Intent intent = new Intent(); |
| | | intent.putExtra("msgId", item.getMsgId().toString()); |
| | | intent.setClass(_mActivity, MessageInfoActivity.class); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | | } |
| | |
| | | super.onEventMessage(eventBus); |
| | | //接收外部点击事件 |
| | | if (eventBus.getTopic().equals(ConstantManage.message_function_tab_switch)) { |
| | | if (eventBus.getType().equals(HdlCommonLogic.MessageFunctionTabSwitch.all.toString())) { |
| | | if (eventBus.getType().equals(MessageFunctionTabSwitch.all.toString())) { |
| | | getAllMessageList(true); |
| | | HdlLogLogic.print("正在点击【全部】"); |
| | | } |
| | |
| | | if (isShowLoading) { |
| | | showLoading(); |
| | | } |
| | | HdlMessageLogic.getInstance().getMessageList(HdlMessageLogic.MessageStatus.processed, new CloudCallBeak<List<MessageBean>>() { |
| | | HdlMessageLogic.getInstance().getAllMessageList(new CloudCallBeak<List<MessageBean>>() { |
| | | @Override |
| | | public void onSuccess(List<MessageBean> list) { |
| | | if (isShowLoading) { |