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" />