From 1ecad0f89f154e2a51fd8e6597ced4db089bad86 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 22 Oct 2022 11:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=AE=9A=E9=A1=B5=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/manager/IMLoginManager.java | 13 ++++++++++--- .../live/activity/LiveAudienceActivity.java | 2 +- .../com/yunbao/main/activity/MainActivity.java | 2 +- .../yunbao/main/activity/SettingActivity.java | 6 +++--- .../java/com/yunbao/main/dialog/HintDialog.java | 1 - main/src/main/res/drawable/bc_reward.xml | 2 +- main/src/main/res/layout/item_setting.xml | 17 ++++++----------- main/src/main/res/layout/item_setting_1.xml | 17 ++++++----------- main/src/main/res/layout/item_setting_2.xml | 11 ++++------- 9 files changed, 32 insertions(+), 39 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index 3cbf73f24..f171828cd 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -34,14 +34,20 @@ public class IMLoginManager extends BaseCacheManager { private final static String IS_FLOAT = "is_float"; private final static String IS_HINT = "is_hint"; + public boolean isHint() { - return TextUtils.equals("1", getString(IS_HINT)) || TextUtils.isEmpty(getString(IS_HINT)); + return 1 == getInt(IS_HINT, 0); } - public void initISHint(String isHint) { - put(IS_HINT, isHint); + public void initISHint() { + if (getInt(IS_HINT, 0) < 2) { + int number = getInt(IS_HINT, 0) + 1; + put(IS_HINT, number); + } + } + /** * 存储是否打开悬浮窗权限提示 * @@ -287,6 +293,7 @@ public class IMLoginManager extends BaseCacheManager { // IMCenter.getInstance().clearConversations(null, Conversation.ConversationType.PRIVATE); RongcloudIMManager.logoutIM(); MessageIMManager.get(context).logout(); + put(IS_HINT, 0); } diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 0ee8b5eee..eaa2a8f33 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -183,7 +183,7 @@ public class LiveAudienceActivity extends LiveActivity { if (EasyFloat.isShow("LiveFloatView")) { EasyFloat.dismiss("LiveFloatView", true); } - IMLoginManager.get(mContext).initISHint("1"); + IMLoginManager.get(mContext).initISHint(); } public void setBackIndex(int backIndex) { 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 0e59f28cc..e8ae1fcbb 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -480,7 +480,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene new Handler().postDelayed(new Runnable() { @Override public void run() { - if (!IMLoginManager.get(mContext).isHint()) { + if (IMLoginManager.get(mContext).isHint()) { HintDialog fragment = new HintDialog(); fragment.show(getSupportFragmentManager(), "HintDialog"); } diff --git a/main/src/main/java/com/yunbao/main/activity/SettingActivity.java b/main/src/main/java/com/yunbao/main/activity/SettingActivity.java index f03bc0b6e..f57051b5b 100644 --- a/main/src/main/java/com/yunbao/main/activity/SettingActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/SettingActivity.java @@ -144,12 +144,12 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener< ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects); } //更新特效开关 - IMLoginManager.get(mContext).setMountEffect(mountEffect); + IMLoginManager.get(mContext).setMountEffect(giftEffect); } }); //屏蔽礼物特效 - ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() { + ViewClicksAntiShake.clicksAntiShake(studioRideEffects, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { giftEffect = !giftEffect; @@ -159,7 +159,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener< ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects); } //更新特效开关 - IMLoginManager.get(mContext).setGiftEffect(giftEffect); + IMLoginManager.get(mContext).setGiftEffect(mountEffect); } }); //直播间滚动 diff --git a/main/src/main/java/com/yunbao/main/dialog/HintDialog.java b/main/src/main/java/com/yunbao/main/dialog/HintDialog.java index b38b53742..269a98382 100644 --- a/main/src/main/java/com/yunbao/main/dialog/HintDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/HintDialog.java @@ -42,7 +42,6 @@ public class HintDialog extends AbsDialogFragment { @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - IMLoginManager.get(mContext).initISHint("3"); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_set_up), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { diff --git a/main/src/main/res/drawable/bc_reward.xml b/main/src/main/res/drawable/bc_reward.xml index 0ad03fe1d..5e9d5b32b 100644 --- a/main/src/main/res/drawable/bc_reward.xml +++ b/main/src/main/res/drawable/bc_reward.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/main/src/main/res/layout/item_setting.xml b/main/src/main/res/layout/item_setting.xml index a42727316..b6f235388 100644 --- a/main/src/main/res/layout/item_setting.xml +++ b/main/src/main/res/layout/item_setting.xml @@ -1,12 +1,10 @@ - + android:paddingLeft="26.33dp" + android:paddingRight="26.33dp"> + android:textSize="16sp" /> + android:src="@mipmap/icon_arrow_right" /> + android:background="@color/gray2" /> \ No newline at end of file diff --git a/main/src/main/res/layout/item_setting_1.xml b/main/src/main/res/layout/item_setting_1.xml index a1afaa3af..ee252d187 100644 --- a/main/src/main/res/layout/item_setting_1.xml +++ b/main/src/main/res/layout/item_setting_1.xml @@ -1,12 +1,10 @@ - + android:paddingLeft="26.33dp" + android:paddingRight="26.33dp"> + android:textSize="16sp" /> + android:textSize="16sp" /> + android:background="@color/gray2" /> \ No newline at end of file diff --git a/main/src/main/res/layout/item_setting_2.xml b/main/src/main/res/layout/item_setting_2.xml index 362b2be20..d942b9cac 100644 --- a/main/src/main/res/layout/item_setting_2.xml +++ b/main/src/main/res/layout/item_setting_2.xml @@ -1,19 +1,16 @@ - + android:layout_height="wrap_content"> + android:textSize="16sp" />