去掉贵族特权的魔法数字

This commit is contained in:
huangjian
2022-10-31 18:29:22 +08:00
parent 970f42032b
commit 22c29763ad
2 changed files with 79 additions and 2 deletions

View File

@@ -0,0 +1,75 @@
package com.mango.moshen.vip;
/**
* 贵族权益
*/
public interface VipAuthType {
/**
* 铭牌
*/
int NAMEPLATE = 1;
/**
* 头饰
*/
int HEADWEAR = 2;
/**
* 座驾
*/
int CAR = 3;
/**
* 礼物
*/
int GIFT = 4;
/**
* 用户资料卡
*/
int USER_INFO_CARD = 5;
/**
* 财富等级提成
*/
int LEVEL_EXP_BUFF = 6;
/**
* 表情
*/
int FACE = 7;
/**
* 麦位光圈
*/
int MIC_CIRCLE = 8;
/**
* 麦位昵称颜色
*/
int MIC_NICK_COLOUR = 9;
/**
* 好友昵称颜色
*/
int FRIEND_NICK_COLOUR = 10;
/**
* 聊天气泡
*/
int ROOM_CHAT_BUBBLE = 11;
/**
* 进场特效
*/
int IN_ROOM_SPECIAL_EFFECTS = 12;
/**
* 隐身进房
*/
int INVISIBLE_IN_ROOM = 13;
/**
* 房间小喇叭
*/
int ROOM_HORN = 14;
/**
* 防被踢
*/
int PREVENT_KICK = 15;
/**
* 隐身访问主页
*/
int INVISIBLE_LOOK_HOMEPAGE = 16;
/**
* 房间热度提升
*/
int ROOM_HOT = 17;
}

View File

@@ -155,8 +155,10 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
keepParams.horizontalBias = it.levelKeepScore.toFloat() / it.levelUpScore
binding.ivKeepIndicator.layoutParams = keepParams
val isShowEnterHide = it.ownAuthTypes?.contains(13) == true
val isShowLookHide = it.ownAuthTypes?.contains(16) == true
val isShowEnterHide =
it.ownAuthTypes?.contains(VipAuthType.INVISIBLE_IN_ROOM) == true
val isShowLookHide =
it.ownAuthTypes?.contains(VipAuthType.INVISIBLE_LOOK_HOMEPAGE) == true
if ((isShowEnterHide || isShowLookHide) && mTitleBar.actionCount == 1) {
mTitleBar.addAction(object : TitleBar.ImageAction(R.drawable.ic_vip_setting) {
override fun performAction(view: View) {