From 0481db2570e1cfad0eb8ecbe6112ac4ab3921b8f Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Thu, 28 Mar 2024 13:06:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20[=E4=BF=AE=E5=A4=8D-=E7=B2=BE=E5=BD=A9?= =?UTF-8?q?=E7=9B=B4=E6=92=AD=E6=98=BE=E7=A4=BA=E4=BD=8D=E7=BD=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/main/activity/MainActivity.java | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 59a8323..a9acf35 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -519,12 +519,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //选中监听 mTabButtonGroup.addTabButtonGroupChangeListener((view, index) -> { - if (index == 0) { - floatBanner.setVisibility(View.GONE); - floatRedPacket.setVisibility(View.GONE); - floatWarOrder.setVisibility(View.GONE); - findViewById(R.id.banner_click).setVisibility(View.GONE); - isfloatBannernet = false; + if (index == 1) { + isfloatBannernet = true; + initAnchorRecommendBanner(); } else if (index == 2) { floatBanner.setVisibility(View.GONE); floatRedPacket.setVisibility(View.GONE); @@ -533,8 +530,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene isfloatBannernet = false; if (mainMessageViewHolder != null) mainMessageViewHolder.onResume(); } else { - isfloatBannernet = true; - initAnchorRecommendBanner(); + floatBanner.setVisibility(View.GONE); + floatRedPacket.setVisibility(View.GONE); + floatWarOrder.setVisibility(View.GONE); + findViewById(R.id.banner_click).setVisibility(View.GONE); + isfloatBannernet = false; } }); //获取指导员账号 @@ -545,20 +545,19 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } private void showFirstLogin() { - LiveNetManager.get(mContext) - .isFirstLogin(new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(FirstLoginBean data) { - if (data.getStatus() == 0) { - mContext.startActivity(new Intent(mContext, CompleteUserInfoActivity.class)); - } - } + LiveNetManager.get(mContext).isFirstLogin(new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(FirstLoginBean data) { + if (data.getStatus() == 0) { + mContext.startActivity(new Intent(mContext, CompleteUserInfoActivity.class)); + } + } - @Override - public void onError(String error) { + @Override + public void onError(String error) { - } - }); + } + }); } /**