| | |
| | | package com.hdl.photovoltaic.ui.message; |
| | | |
| | | import android.os.Bundle; |
| | | import android.os.SystemClock; |
| | | import android.view.View; |
| | | |
| | | |
| | |
| | | import com.hdl.photovoltaic.databinding.FragmentMessageBinding; |
| | | import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; |
| | | import com.hdl.photovoltaic.enums.MessageFunctionTabSwitch; |
| | | import com.hdl.photovoltaic.enums.MessageStateType; |
| | | import com.hdl.photovoltaic.other.HdlCommonLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | | import com.hdl.photovoltaic.other.HdlMessageLogic; |
| | | import com.hdl.photovoltaic.ui.bean.BUserInfo; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | |
| | | //接收外部点击事件 |
| | | if (eventBus.getTopic().equals(ConstantManage.homepage_title_tab_switch)) { |
| | | if (eventBus.getType().equals(HomepageTitleTabSwitch.message.toString())) { |
| | | postEventBus(MessageFunctionTabSwitch.nascent); |
| | | HdlLogLogic.print("正在点击【消息】"); |
| | | // 取消粘性事件 |
| | | EventBus.getDefault().removeStickyEvent(eventBus); |
| | | postEventBus(MessageFunctionTabSwitch.nascent); |
| | | HdlLogLogic.print("正在点击【消息】"); |
| | | |
| | | } |
| | | } else if (eventBus.getTopic().equals(ConstantManage.message_count)) { |
| | | if (eventBus.getType().equals(MessageStateType.untreated)) { |
| | | String s = getText(R.string.message_nascent) + "(" + HdlMessageLogic.getInstance().getNascentMessageMemoryList().size() + ")"; |
| | | viewBinding.messageTabNascentTitleTv.setText(s); |
| | | } else if (eventBus.getType().equals(MessageStateType.processed)) { |
| | | String s = getText(R.string.message_recover) + "(" + HdlMessageLogic.getInstance().getRecoverMessageMemoryList().size() + ")"; |
| | | viewBinding.messageTabRecoverTitleTv.setText(s); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |