From 4598b51c90c695c9ccbe5350a84e4a46b9d8e587 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期三, 22 五月 2024 20:19:02 +0800 Subject: [PATCH] 2024年05月22日20:18:54 --- app/src/main/java/com/hdl/photovoltaic/ui/me/MeFragment.java | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/MeFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/MeFragment.java index 288b43a..65e4f84 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/me/MeFragment.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/me/MeFragment.java @@ -9,7 +9,6 @@ import androidx.annotation.Nullable; import com.alibaba.fastjson.JSONObject; -import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.google.gson.Gson; import com.hdl.linkpm.sdk.core.exception.HDLException; import com.hdl.photovoltaic.R; @@ -30,6 +29,8 @@ import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; import org.greenrobot.eventbus.EventBus; +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; /** * 鎴戠殑-鐣岄潰 @@ -189,7 +190,7 @@ } }); final int[] count = {0}; - viewBinding.toolbarTopFragmentMeRl.topTitleTv.setOnClickListener(new View.OnClickListener() { + viewBinding.meTitleTv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { count[0] = count[0] + 1; @@ -207,11 +208,6 @@ * 鍒濆鍖栫晫闈� */ private void initView() { - - - viewBinding.toolbarTopFragmentMeRl.topTitleTv.setText(R.string.me); -// viewBinding.toolbarTopFragmentMeRl.topMoreIv.setVisibility(View.VISIBLE); -// viewBinding.toolbarTopFragmentMeRl.topMoreIv.setImageResource(R.drawable.message); viewBinding.fragmentMeLineSetIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.set); @@ -269,7 +265,7 @@ } - @Override + @Subscribe(threadMode = ThreadMode.MAIN, sticky = true) public void onEventMessage(BaseEventBus eventBus) { super.onEventMessage(eventBus); if (eventBus == null) { @@ -278,6 +274,8 @@ //鎺ユ敹澶栭儴鐐瑰嚮浜嬩欢 if (eventBus.getTopic().equals(ConstantManage.homepage_title_tab_switch)) { if (eventBus.getType().equals(HomepageTitleTabSwitch.me.toString())) { + // 鍙栨秷绮樻�т簨浠� + EventBus.getDefault().removeStickyEvent(eventBus); //璇诲彇澶村儚 if (UserConfigManage.getInstance().isBAccount()) { this.getBUserInfo(); -- Gitblit v1.8.0